[oi-dev] elegant way to get leaf packages?

Tim Mooney Tim.Mooney at ndsu.edu
Sun Dec 26 03:36:23 UTC 2021


All-

Is there an elegant way using pkg (or some other method) to get all
OpenIndiana "leaf" packages, i.e. packages that are not a dependency of
some other package?

I know how to get this using a brute-force method that is essentially

all_packages=`pkg list -a | some filtering here`
for p in `echo $all_packages`
do
 	pkg search -r -o pkg.name "depend:require:$p" > depends-upon-$p
done

I'm just wondering if there is a more clever, or perhaps less intensive
on the publisher server, way to get the same info?

Thanks,

Tim
-- 
Tim Mooney                                             Tim.Mooney at ndsu.edu
Enterprise Computing & Infrastructure /
Division of Information Technology    /                701-231-1076 (Voice)
North Dakota State University, Fargo, ND 58105-5164



More information about the oi-dev mailing list