Joanmarie Diggs wrote:
Fair enough.

Follow-up question: What is the definition of "installable" as far as it
relates to "list-worthy"?

$ pkg list -avf SUNWlibatk
FMRI                                                             STATE      
UFOXI
pkg://joanmarie.homeunix.org/[email protected],5.11-0.127.1:20091121T050611Z 
installed  u----
pkg://localhost/[email protected],5.11-0.127:20091203T195739Z    known      
-----
pkg://localhost/[email protected],5.11-0.127.1:20091203T231157Z  known      
u----
pkg://opensolaris.org/[email protected],5.11-0.128:20091125T030327Z known      
u----
pkg://opensolaris.org/[email protected],5.11-0.127:20091111T090711Z known      
u----
[...]

The third item doesn't show up in PM or with pkg list -a. It is
installable however without my making any changes whatsoever. I just did
so via Web Install:

$ pkg list -a SUNWlibatk
NAME (PUBLISHER)                              VERSION         STATE      UFOXI
SUNWlibatk (localhost)                        0.5.11-0.127.1  installed  u----

So here's where things get fun. First, the man page definitions of the behaviour:

           With -a, list installed packages and the newest version of
           packages that are not installed and are available for
           installation; without -a, list only installed packages.

Now the details (a package is not listed if):

1) it is for a variant that does not apply to the image (think SPARC packages on i386 systems and vice-versa, zone packages, etc.)

2) it is not installed, and is simply the older name of a package already installed (think SUNWvim getting renamed to vim, and you have vim installed, therefore no reason to list SUNWvim) and it is part of an installed incorporation (such as entire)

3) it is not installed, and is the newer name of an installed package (you have SUNWvim installed, which has been renamed to 'vim' in a newer version)

4) it is another version of a package that is already installed, because only a "install -nv" or "image-update -nv" knows what version *can* be installed. For example, if you have 1.0 installed, and all other versions are 0.9, those aren't "installable" since we don't support downgrade, and even if they were, they're probably not interesting to most users by default. Likewise, if you have sunw...@127 installed, sunw...@128 isn't interesting to you normally because it is part of the entire incorporation and so can't be installed without an image-update.

There are probably some other bits I forgot, but that's the main brunt of the filtering logic.

Essentially, pkg list -a really means "list installed + not_installed (latest available)" and the GUI does this by default as well.

Cheers,
--
Shawn Walker
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to