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

2021-12-26 Thread Tim Mooney via oi-dev

In regard to: Re: [oi-dev] elegant way to get leaf packages?, Till...:

You basically need to do what you are doing, but you can limit your search to 
local with -l parameter to pkg search. That would result in your local leaf 
packages. To get the full list for OI, the simplest way is to grep the 
Makefiles for 32bit builds. They are explicitly mentioned there. From what I 
remember it should only be library packages and big hitters like libreoffice.


Thanks Till!

Since my initial idea was to find all leaf nodes, it didn't occur to me to
start by first looking for leaf nodes only among my installed software.
There are a lot of OI packages I don't have installed on either my main
workstation or my build box, but your suggestion about searching locally
is still a good one.

Your suggestion to use oi-userland is also a good idea.  I think I'm going
to use that approach.

I had no real idea what percent of packages were now 64-bit only, so this
exercise is really just for me to get a clearer picture of what components
still ship 32 bit binaries.

Thanks again,

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

___
oi-dev mailing list
oi-dev@openindiana.org
https://openindiana.org/mailman/listinfo/oi-dev


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

2021-12-26 Thread Till Wegmueller

Hey Tim

You basically need to do what you are doing, but you can limit your 
search to local with -l parameter to pkg search. That would result in 
your local leaf packages. To get the full list for OI, the simplest way 
is to grep the Makefiles for 32bit builds. They are explicitly mentioned 
there. From what I remember it should only be library packages and big 
hitters like libreoffice.


There is a feature in omnios PKG which we could port at some point 
(autoremove) and one could use the python API to write a script to do 
that. But that would also call a lot of search queries.


-Till

On 26.12.21 15:20, Tim Mooney via oi-dev wrote:

In regard to: Re: [oi-dev] elegant way to get leaf packages?,...:


I am not sure I understand your question.  Please clarify.


I'm using "leaf" in the same sense as in a computer science tree
structure; a node that does not have any descendants.

 https://en.wikipedia.org/wiki/Tree_(data_structure)

A tree isn't the best model for package dependencies; a directed graph
is better, but the terminology for a node with no exiting vertices
isn't as clear, so I used "leaf" thinking everyone would understand
what I was asking for.  Sorry if that just made things worse.

A package like 'glib' or 'python-39' have many other packages that depend
upon them.  glib and python-39 are *not* leaf packages.

An example of a 'leaf' package would be 'media/vlc'.  There are
(currently) no other OI packages that list media/vlc as a dependency.
Leaf packages are typically "end user applications", but even something
like 'editor/vim' is not a leaf, because it has at least one real package
(editor/gvim and SUNWvim) that depends upon it.  The distinction is a
little fuzzy here because it also has 'mate_install' and 'server_install'
as dependencies, but for my purposes I wouldn't count those.

My reason for asking is that I wanted to get a complete list of all
leaf packages for OI, and then see which of those packages still ship
32 bit binaries.  I'm just trying to get an idea of easy components for
conversion to be 64 bit only.

pkg exact-install  installs a package but removes all 
"leaf packages" (?) that are not a dependency of the given package.


Thanks for the suggestion about exact-install, but for what I'm trying to
identify, it's not really an option.  It only looks at a portion of the
dependency graph.

As I said in my original question, I know how to generate the list using
a brute force method.  I was just wondering if there was a better method
that doesn't require running hundreds or thousands of 'pkg' commands to
find all the leaf nodes.

Thanks,

Tim


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?




___
oi-dev mailing list
oi-dev@openindiana.org
https://openindiana.org/mailman/listinfo/oi-dev


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

2021-12-26 Thread Tim Mooney via oi-dev

In regard to: Re: [oi-dev] elegant way to get leaf packages?,...:


I am not sure I understand your question.  Please clarify.


I'm using "leaf" in the same sense as in a computer science tree
structure; a node that does not have any descendants.

https://en.wikipedia.org/wiki/Tree_(data_structure)

A tree isn't the best model for package dependencies; a directed graph
is better, but the terminology for a node with no exiting vertices
isn't as clear, so I used "leaf" thinking everyone would understand
what I was asking for.  Sorry if that just made things worse.

A package like 'glib' or 'python-39' have many other packages that depend
upon them.  glib and python-39 are *not* leaf packages.

An example of a 'leaf' package would be 'media/vlc'.  There are
(currently) no other OI packages that list media/vlc as a dependency.
Leaf packages are typically "end user applications", but even something
like 'editor/vim' is not a leaf, because it has at least one real package
(editor/gvim and SUNWvim) that depends upon it.  The distinction is a
little fuzzy here because it also has 'mate_install' and 'server_install'
as dependencies, but for my purposes I wouldn't count those.

My reason for asking is that I wanted to get a complete list of all
leaf packages for OI, and then see which of those packages still ship
32 bit binaries.  I'm just trying to get an idea of easy components for
conversion to be 64 bit only.


pkg exact-install  installs a package but removes all "leaf 
packages" (?) that are not a dependency of the given package.


Thanks for the suggestion about exact-install, but for what I'm trying to
identify, it's not really an option.  It only looks at a portion of the
dependency graph.

As I said in my original question, I know how to generate the list using
a brute force method.  I was just wondering if there was a better method
that doesn't require running hundreds or thousands of 'pkg' commands to
find all the leaf nodes.

Thanks,

Tim


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?


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

___
oi-dev mailing list
oi-dev@openindiana.org
https://openindiana.org/mailman/listinfo/oi-dev


[oi-dev] Squeak and libjpeg9-ijg

2021-12-26 Thread s...@pandora.be


Hi,

I'm submitting a package called libjpeg9-ijg version 9.4.0.

libjpeg is a library from the Independent JPEG Group  (http://www.ijg.org) 

Apparently some contributors to libjpeg software are also reading this mailing 
list by the way,
but I see no libjpeg9 package for OpenIndiana for 9.4.0 so I created one.

I know very little of JPEG but my package was to test with Squeak 
(Smalltalk-80) which can open JPEG images with a plugin.

To test JPEG in Squeak the Smalltalk code is documented at 
http://wiki.squeak.org/squeak/4043

Squeak is currently in the OpenIndiana repo and depends on libjpeg6-ijg and 
that works with libjpeg6-ijg.

But I tested now setting linking against libjpeg9 and that does NOT work : 
Squeak loads libjpeg.so.9.4.0 but does not display a JPEG image ... (unlike 
squeak when linked against libjpeg6-ijg).

Neither does using libjpeg8-turbo or libjpeg62-turbo work for Squeak.  So it 
seems the Squeak plugin depends on something in libjpeg6-ijg and this needs to 
be fixed at the Squeak VM level.

Nevertheless I'm submitting the libjpeg9-ijg package which may be useful for 
some other purposes, or in the future for Squeak as well ...

Regards,
David Stes

___
oi-dev mailing list
oi-dev@openindiana.org
https://openindiana.org/mailman/listinfo/oi-dev


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

2021-12-26 Thread s...@pandora.be


Check pkg exact-install with the --reject option.

For example if you have a full install of some group,

 pkg exact-install --reject somepackage   group

- Op 26 dec 2021 om 4:36 schreef oi-dev oi-dev@openindiana.org:


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

___
oi-dev mailing list
oi-dev@openindiana.org
https://openindiana.org/mailman/listinfo/oi-dev


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

2021-12-26 Thread s...@pandora.be


 I am not sure I understand your question.  Please clarify.

 However I can add that I once used "pkg exact-install"
for something that sounds a little bit like what you are asking.

 Perhaps this can be used in combination with -n -v dry run verbose.

 pkg install  installs a package
 
 pkg exact-install  installs a package but removes all "leaf 
packages" (?) that are not a dependency of the given package.

 Check the pkg manpage for exact-install.

 WARNING: always first make a backup BE before testing exact-install because it 
will remove packages that are not a dependency.

 I am using (sometimes) exact-install in an attempt to uninstall "recursively" 
although that's probably the wrong terminology.

Regards,
David Stes


- Op 26 dec 2021 om 4:36 schreef oi-dev oi-dev@openindiana.org:

> 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.moo...@ndsu.edu
> Enterprise Computing & Infrastructure /
> Division of Information Technology/701-231-1076 (Voice)
> North Dakota State University, Fargo, ND 58105-5164
> 
> ___
> oi-dev mailing list
> oi-dev@openindiana.org
> https://openindiana.org/mailman/listinfo/oi-dev

___
oi-dev mailing list
oi-dev@openindiana.org
https://openindiana.org/mailman/listinfo/oi-dev