Hi all,

Here is a first draft of my rework of the current status, list and info
commands.  Please take a look.  Our fearless leader has asked for this
to be in the gate by Friday, so your prompt attention is appreciated.

The mapping of old to new commands is:

        OLD             NEW
        info            info
        info -s         list -s
        info -m         contents -m
        list -*         contents -*
        status -*       list -*

Here's the pointer:

        http://cr.opensolaris.org/~dp/ips-cli-rewhack

I also had some 'search' improvements, but was worried about testing
them properly, and didn't want them to drag down this effort.
Danek helped me extract those fixes out into a separate patch-- we'll
get those in this week if we can.

Still left to do is adding a few extra test cases: I'll work on that
tomorrow.

Here are some output comparisons:
----------------------------------------------------------------------
old # pkg info SUNWzone
Name: SUNWzone
FMRI: pkg://opensolaris.org/[EMAIL PROTECTED],5.11-0.79:20080205T172310Z
Version: 0.5.11
Branch: 0.79
Packaging Date: 2008-02-05 17:23:10
Size: 1040836
Summary: Solaris Zones (Usr)

new # pkg info SUNWzone
          Name: SUNWzone
       Summary: Solaris Zones (Usr)
     Authority: foo (default)
       Version: 0.5.11
 Build Release: 5.11
        Branch: 0.79
Packaging Date: Tue Feb  5 17:23:10 2008
          Size: 1016 KB
          FMRI: pkg:/[EMAIL PROTECTED],5.11-0.79:20080205T172310Z

----------------------------------------------------------------------
old # pkg status
FMRI                                               STATE      UFIX
pkg://opensolaris.org/[EMAIL PROTECTED]          installed  ----
pkg://opensolaris.org/[EMAIL PROTECTED] installed  ----
pkg://opensolaris.org/[EMAIL PROTECTED] installed  ----
pkg://opensolaris.org/[EMAIL PROTECTED] installed  ----
pkg://opensolaris.org/[EMAIL PROTECTED]     installed  ----
pkg://opensolaris.org/[EMAIL PROTECTED] installed  ----
pkg://opensolaris.org/[EMAIL PROTECTED]    installed  ----
pkg://opensolaris.org/[EMAIL PROTECTED]         installed  ----

new # pkg list
NAME (AUTHORITY)                              VERSION         STATE      UFIX
FSWxorg-clientlibs                            0.5.11-0.79     installed  ----
FSWxwrtl                                      0.5.11-0.79     installed  ----
SUNWTiff                                      0.5.11-0.79     installed  ----
SUNWadmlib-sysid                              0.5.11-0.79     installed  ----
SUNWbzip                                      1.0.4-0.79      installed  ----
SUNWckr                                       0.5.11-0.79     installed  ----
SUNWcs                                        0.5.11-0.79     installed  ----
SUNWcsl                                       0.5.11-0.79     installed  ----
SUNWdbus                                      0.5.11-0.79     installed  ----

----------------------------------------------------------------------
(Note that the following is a semantics change; it used to be that
if you did "status <pkgname>" you got info on all versions of that
package.  Now you'd need to specify -a to get that information; this
is more consistent with the "list all" behaviour, and is useful in
the test suite as well-- see the simplifications which became possible
in the various test cases).

old # pkg status SUNWzone
FMRI                                               STATE      UFIX
pkg://opensolaris.org/[EMAIL PROTECTED]         installed  ----
pkg://opensolaris.org/[EMAIL PROTECTED]         known      u---
pkg://opensolaris.org/[EMAIL PROTECTED]         known      u---

new # pkg list SUNWzone
NAME (AUTHORITY)                              VERSION         STATE      UFIX
SUNWzone                                      0.5.11-0.79     installed  ----

new # pkg list -a SUNWzone
NAME (AUTHORITY)                              VERSION         STATE      UFIX
SUNWzone                                      0.5.11-0.79     installed  ----
SUNWzone                                      0.5.11-0.75     known      u---
SUNWzone                                      0.5.11-0.75     known      u---

----------------------------------------------------------------------
old # pkg list -o :name,path -t dir SUNWzone
:NAME PATH
dir   etc
dir   etc/zones
dir   lib
dir   lib/svc
dir   lib/svc/method
dir   usr
dir   usr/bin
dir   usr/kernel
dir   usr/kernel/drv
...

new # pkg contents -o action.name,path -t dir SUNWzone     
ACTION.NAME PATH
dir         etc
dir         etc/zones
dir         lib
dir         lib/svc
dir         lib/svc/method
dir         usr
...

----------------------------------------------------------------------
new # pkg contents -o pkg.shortfmri,fmri -t depend
PKG.SHORTFMRI                        FMRI
pkg:/[EMAIL PROTECTED]  pkg:/[EMAIL PROTECTED]
pkg:/[EMAIL PROTECTED]  pkg:/[EMAIL PROTECTED]
pkg:/[EMAIL PROTECTED]  pkg:/[EMAIL PROTECTED]
pkg:/[EMAIL PROTECTED]  pkg:/[EMAIL PROTECTED]
pkg:/[EMAIL PROTECTED]
pkg:/[EMAIL PROTECTED]
pkg:/[EMAIL PROTECTED]  pkg:/[EMAIL PROTECTED]
pkg:/[EMAIL PROTECTED]            pkg:/[EMAIL PROTECTED]
pkg:/[EMAIL PROTECTED]            pkg:/[EMAIL PROTECTED]

----------------------------------------------------------------------

Thanks,

        -dp

-- 
Daniel Price - Solaris Kernel Engineering - [EMAIL PROTECTED] - blogs.sun.com/dp
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to