Greetings,
The following webrev contains changes and fixes for the following issues
and RFEs:
5872 List APIs required
12929 image.py:get_publisher_ranks can traceback after older client
configuration changes
12946 pkg list should provide way to list only newest versions of all
packages
webrev:
http://cr.opensolaris.org/~swalker/pkg-list/
Summary of Changes
==================
* pkg list now handles renamed packages correctly. So if a package is
incorporated and has been renamed, it will show only one name for that
package if it is not installed (the newest name allowed by installed
incorporations).
* pkg list now automatically filters out all variants that do not apply
to the image (currently only filters based on arch and zone variants).
* pkg list now shows packages in stem, publisher, version order, instead
of stem, version, publisher order. This change was necessary from a
performance and memory usage standpoint as the old order required
retrieving all known versions for a specific package stem and then
version sorting them.
Previous Output:
NAME (PUBLISHER) VERSION STATE UFOXI
foo 1.1 known -----
foo (test2) 1.1 known -----
foo 1.0 known u----
foo (test2) 1.0 known u----
New Output:
NAME (PUBLISHER) VERSION STATE UFOXI
foo 1.1 known -----
foo 1.0 known u----
foo (test2) 1.1 known -----
foo (test2) 1.0 known u----
* pkg list -a now only shows installed packages and packages available
for installation. It omits package versions that are not allowed by
currently installed incorporations. This means that if you do not have
SUNWvim installed, but you do have ent...@127, it will list sunw...@127
instead of sunw...@129 which is the newest version, but not the newest
version allowed by the 'entire' incorporation.
* a new option to pkg list, '-n' has been added which shows the latest
versions of all known packages.
* man page usage for pkg list has been clarified
* pkg list no longer allows certain combinations of options to prevent
nonsense results or ignored options
Performance Summary
===================
What follows is a quick summary of performance differences for pkg list
between gate tip and my workspace. Image was configured with following
publishers for a total of 57,541 known package versions (2,030 unique
packages), and 762 installed packages using an install of build 127.
Timings below are the best of three executions.
$ pkg -R / publisher
PUBLISHER TYPE STATUS URI
opensolaris.org (preferred) origin online http://../dev
extra origin online http://../extra/
punchin origin online http://..
contrib.opensolaris.org (disabled) origin online http://../contrib
time pkg -R / list > /dev/null
------------------------------
old:
real 0m0.389s
user 0m0.316s
sys 0m0.069s
new:
real 0m0.502s
user 0m0.434s
sys 0m0.063s
time pkg -R / list -a > /dev/null
---------------------------------
old:
real 0m5.372s
user 0m5.252s
sys 0m0.100s
new:
real 0m2.735s
user 0m2.517s
sys 0m0.176s
time pkg -R / list -af > /dev/null
---------------------------------
(Yes, this case is slower due to variant filtering, etc.)
old:
real 0m6.463s
user 0m6.344s
sys 0m0.099s
new:
real 0m14.585s
user 0m14.365s
sys 0m0.177s
time pkg -R / list -s > /dev/null
---------------------------------
old:
real 0m2.935s
user 0m2.826s
sys 0m0.078s
new:
real 0m0.497s
user 0m0.430s
sys 0m0.063s
time pkg -R / list -as > /dev/null
---------------------------------
old:
real 0m33.874s
user 0m33.558s
sys 0m0.191s
new:
real 0m2.726s
user 0m2.507s
sys 0m0.176s
time pkg -R / list -asf > /dev/null
---------------------------------
old:
Unknown; I gave up waiting after several minutes. Didn't really want to
have to download 1.2GB+ of manifests :)
new:
real 0m14.254s
user 0m14.028s
sys 0m0.178s
time pkg -R / list -v > /dev/null
---------------------------------
old:
real 0m0.387s
user 0m0.321s
sys 0m0.061s
new:
real 0m0.498s
user 0m0.430s
sys 0m0.062s
time pkg -R / list -av > /dev/null
---------------------------------
old:
real 0m5.384s
user 0m5.268s
sys 0m0.099s
new:
real 0m2.729s
user 0m2.510s
sys 0m0.176s
Cheers,
--
Shawn Walker
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss