This looks good.  The only nit I have is that you need to fix the -b
option to install and image-update so that it works with the file-size
changes you made.  The -b option used to allow you to specify the number
of files in a filelist, but since that's changed it probably makes sense
to use that option to allow the user to tune the maxsize of a filelist.

-j

On Thu, Jan 17, 2008 at 04:40:54PM -0800, Dan Price wrote:
> 
> Hi all,
> 
> I've been working away to improve the command line output of various
> parts of the 'pkg' command; please take a look at this wad:
> 
>         373 design a nice default output for install/update/remove
>         374 filelist should work in ~5MB chunks, not in 64 file increments
>         381 Fix some corner cases in verify logic
> 
>         http://cr.opensolaris.org/~dp/ips-status/
> 
> There are a couple of things here:
> 
>         - New output for interactive use
>         - New output for non-interactive (i.e. through a pipe) use
>         - New -q option for "quiet"
> 
> Here are some examples; it's a little hard to see how this works
> until you use it interactively, but I'll try to annotate.
> 
> # pkg image-create -a 'cyber=http://cyber:80' /tmp/moo
> # pkg install SUNWfirefox
> DOWNLOAD                                    PKGS       FILES     XFER (MB)
> Completed                                  46/46 10279/10279 495.28/495.28 
> 
> PACKAGE                                     PKGS     ACTIONS  OPERATION
> SUNWfirefox                                46/46 14831/14831  Installing 
> # 
> 
> The first phase is "DOWNLOAD", and this iteratively shows the package being
> downloaded and the progress in getting the files, as well as the total
> (effective, not compressed) data transferred.  In this case, to get
> firefox, we need a total of 46 packages (since we began with a totally
> empty image).
> 
> The second phase, "PACKAGE" shows the installation of the packages as
> they happen.
> 
> If you run this through a pipe or isatty() is otherwise false, you'll see
> a more simplified output:
> 
> # pkg install SUNWfirefox | cat
> Download: SUNWlibms ...  Done
> Download: SUNWzlib ...  Done
> Download: SUNWlxml ...  Done
> Download: SUNWpool ...  Done
> Download: SUNWlibsasl ...  Done
> Download: SUNWpr ...  Done
> ...
> Install: SUNWlibgcrypt ...  Done
> Install: SUNWgnome-audio ...  Done
> Install: SUNWlibexif ...  Done
> Install: SUNWgnome-libs ...  Done
> Install: SUNWfirefox ...  Done
> 
> Verify now looks like this:
> 
> # chown dp:staff /tmp/moo/usr/bin/poolstat
> # pkg verify
> PACKAGE                                             STATUS
> pkg://cyber/SUNWpool                                 ERROR
>         file: usr/bin/poolstat
>                 Owner: 'dp' should be 'root'
>                 Group: 'staff' should be 'bin'
> #
> 
> # pkg verify -v
> PACKAGE                                             STATUS
> pkg://cyber/SUNWzlib                                    OK
> pkg://cyber/SUNWopenssl                                 OK
> pkg://cyber/SUNWpool                                 ERROR
>         file: usr/bin/poolstat
>                 Owner: 'dp' should be 'root'
>                 Group: 'staff' should be 'bin'
> pkg://cyber/SUNWlibms                                   OK
> pkg://cyber/SUNWlxml                                    OK
> pkg://cyber/SUNWpr                                      OK
> pkg://cyber/SUNWlibsasl                                 OK
> pkg://cyber/SUNWtls                                     OK
> pkg://cyber/SUNWcsl                                     OK
> ...
> 
> # pkg verify -q
> # echo $?
> 1
> 
> While the verify is running a little "Verifying ... |" spinner is
> shown, unless you are emitting the output through a pipe.
> 
>         -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
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to