On 04/ 8/10 04:12 PM, [email protected] wrote:
On Thu, Apr 08, 2010 at 01:13:11PM -0500, Shawn Walker wrote:
Greetings,

The following webrev contains fixes for the following issue:

   15234 "pkg list -a" doesn't account for pattern versions

webrev:
http://cr.opensolaris.org/~swalker/pkg-list-ver/

The code change looks okay, but I have a question about the desired
behavior.  In the bug report, dduvall says the following:

| I can see the utility of listing
|
|     - the version installed if matching the pattern
|     - the latest version matching the pattern
|     - the latest version matching the pattern with current constraints applied
|     - all versions matching the pattern
|     - all versions matching the pattern with current constraints applied

I understand that the -f flag is to match all versions, but for the
remaining three in this list, what happens?

Danek said he was going to think about it, but the more immediate issue was ensuring that at a minimum, -a honored pattern versions. My assumption was that once he decided that, we'd open a separate bugzilla entry to cover those changes.

Also, there's a behavior that I didn't expect with list and rename.
Have we codified what's supposed to happen when an installed package has
been renamed?

Here's the example that I find confusing:

$ pkg list BRCMbnx
pkg list: no packages matching 'BRCMbnx' installed

$ pkg list -a BRCMbnx
pkg list: no packages matching 'BRCMbnx' known or installed

$ pkg list -af BRCMbnx
NAME (PUBLISHER)                              VERSION         STATE      UFOXI
BRCMbnx                                       0.5.11-0.133    known      --r--
BRCMbnx                                       0.5.11-0.132    known      u----
BRCMbnx                                       0.5.11-0.130    known      u----
<...>

BRCMbnx was renamed at 0.133 but list doesn't tell me what it was
renamed to, or if I have it installed.  By looking at the pkg contents,
I'm able to see that it was renamed to driver/network/bnx.  Should pkg
list or pkg list -a return something like this when a renamed package is
installed?

It was discussed some time ago, and decided that the safest thing was for list (and info) to not follow renames when listing packages.

The rename case is particularly tricky when you consider the nature of pkg list and how it's often used to query what can be installed or what is installed.

For that particular rename case, I punted since it can get convoluted pretty quickly.

In general, the goal for -a is to show you packages that you could install or that are already installed.

I'm fine with trying to change the behaviour in this area, but I'd rather address that as a separate changeset if we want to change it.

-Shawn

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

Reply via email to