<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Dec 26, 2021 at 9:18 PM Till Wegmueller <<a href="mailto:toasterson@gmail.com">toasterson@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hey Tim<br>
<br>
You basically need to do what you are doing, but you can limit your <br>
search to local with -l parameter to pkg search. That would result in <br>
your local leaf packages. To get the full list for OI, the simplest way <br>
is to grep the Makefiles for 32bit builds. They are explicitly mentioned <br>
there. From what I remember it should only be library packages and big <br>
hitters like libreoffice.<br>
<br>
There is a feature in omnios PKG which we could port at some point <br>
(autoremove) and one could use the python API to write a script to do <br>
that. But that would also call a lot of search queries.<br></blockquote><div><br></div><div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">It would be very nice as long as it does not work like APT's autoremove :p this one is really a pain...</div></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
-Till<br>
<br>
On 26.12.21 15:20, Tim Mooney via oi-dev wrote:<br>
> In regard to: Re: [oi-dev] elegant way to get leaf packages?,...:<br>
> <br>
>> I am not sure I understand your question. Please clarify.<br>
> <br>
> I'm using "leaf" in the same sense as in a computer science tree<br>
> structure; a node that does not have any descendants.<br>
> <br>
> <a href="https://en.wikipedia.org/wiki/Tree_(data_structure)" rel="noreferrer" target="_blank">https://en.wikipedia.org/wiki/Tree_(data_structure)</a><br>
> <br>
> A tree isn't the best model for package dependencies; a directed graph<br>
> is better, but the terminology for a node with no exiting vertices<br>
> isn't as clear, so I used "leaf" thinking everyone would understand<br>
> what I was asking for. Sorry if that just made things worse.<br>
> <br>
> A package like 'glib' or 'python-39' have many other packages that depend<br>
> upon them. glib and python-39 are *not* leaf packages.<br>
> <br>
> An example of a 'leaf' package would be 'media/vlc'. There are<br>
> (currently) no other OI packages that list media/vlc as a dependency.<br>
> Leaf packages are typically "end user applications", but even something<br>
> like 'editor/vim' is not a leaf, because it has at least one real package<br>
> (editor/gvim and SUNWvim) that depends upon it. The distinction is a<br>
> little fuzzy here because it also has 'mate_install' and 'server_install'<br>
> as dependencies, but for my purposes I wouldn't count those.<br>
> <br>
> My reason for asking is that I wanted to get a complete list of all<br>
> leaf packages for OI, and then see which of those packages still ship<br>
> 32 bit binaries. I'm just trying to get an idea of easy components for<br>
> conversion to be 64 bit only.<br>
> <br>
>> pkg exact-install <somepackage> installs a package but removes all <br>
>> "leaf packages" (?) that are not a dependency of the given package.<br>
> <br>
> Thanks for the suggestion about exact-install, but for what I'm trying to<br>
> identify, it's not really an option. It only looks at a portion of the<br>
> dependency graph.<br>
> <br>
> As I said in my original question, I know how to generate the list using<br>
> a brute force method. I was just wondering if there was a better method<br>
> that doesn't require running hundreds or thousands of 'pkg' commands to<br>
> find all the leaf nodes.<br>
> <br>
> Thanks,<br>
> <br>
> Tim<br>
> <br>
>>> All-<br>
>>><br>
>>> Is there an elegant way using pkg (or some other method) to get all<br>
>>> OpenIndiana "leaf" packages, i.e. packages that are not a dependency of<br>
>>> some other package?<br>
>>><br>
>>> I know how to get this using a brute-force method that is essentially<br>
>>><br>
>>> all_packages=`pkg list -a | some filtering here`<br>
>>> for p in `echo $all_packages`<br>
>>> do<br>
>>> pkg search -r -o <a href="http://pkg.name" rel="noreferrer" target="_blank">pkg.name</a> "depend:require:$p" > depends-upon-$p<br>
>>> done<br>
>>><br>
>>> I'm just wondering if there is a more clever, or perhaps less intensive<br>
>>> on the publisher server, way to get the same info?<br>
> <br>
<br>
_______________________________________________<br>
oi-dev mailing list<br>
<a href="mailto:oi-dev@openindiana.org" target="_blank">oi-dev@openindiana.org</a><br>
<a href="https://openindiana.org/mailman/listinfo/oi-dev" rel="noreferrer" target="_blank">https://openindiana.org/mailman/listinfo/oi-dev</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><font style="font-family:"courier new",monospace" size="1">---<br>Praise the Caffeine embeddings<br></font></div></div></div></div></div>