On Tue, 2010-11-02 at 15:46 -0700, Shawn Walker wrote:
> On 10/31/10 09:20 PM, Tim Foster wrote:
> > http://cr.opensolaris.org/~timf/history-be-webrev/

> > Comments would be most welcome,

Thanks for the review Shawn,

> src/doc/history.txt:
>    general: If you wouldn't mind replacing "swalker" with "username"
>      everywhere, that'd be great.  I never meant to have mine there.

No problem.

>    line 85: Is this the *name* of the new be?  Same question applies
>      to man/pkg.1.txt line 786.

Yep, the name of the new boot environment, I've fixed both of these.

>    line 160: nit: always place two spaces between sentences

Oops - thanks for spotting that.

> src/client.py:
>    line 221: why not -d for date instead of -e?  or are option values
>      sometimes not dates?  I have no particular preference here, just
>      wondering what alternatives were considered.

I picked '-e' for 'event' or 'entry', though strictly speaking, yes, we
really mean timestamp or date. (I started out with -e, mistakenly
thinking there was a 1:1 correspondence between timestamp and event)

'-d' feels like it should be a debug flag, though perhaps '-t' would be
a better choice - fmdump(1) uses this, accepting a scary number of
different date formats (which I'd really like to avoid adding!)

I don't mind changing the flag I'm currently using to -t or any better
suggestions?

During the course of this work, I was half-wondering whether assigning a
uuid to each history event would be useful, allowing users to select
exactly one history event from the command line if they needed it:
ultimately that felt a bit like overkill, though it would have made
writing the tests a bit easier.


>    line 3967: no '' around %s?

Yep, fixed.

> Otherwise, this looks very thorough.  Do you have any sample output?

Sure - I would you like some added to the man page?  Otherwise, there's
some below.   I'll update the webrev once we get consensus on the -e
flag name.

        cheers,
                        tim


(this one just to show the new default output, changing "TIME" to
"START", and changing the combined result-reason field as it screwed
with our field separation: we only show a single word outcome now, more
below ... )

t...@tcx2250-05[1030] pkg history -n 5                   
START                    OPERATION                CLIENT             OUTCOME
2010-11-01T15:38:17      rebuild-image-catalogs   pkg                Canceled
2010-11-01T15:39:45      rebuild-image-catalogs   pkg                Succeeded
2010-11-01T15:39:45      refresh-publishers       pkg                Succeeded
2010-11-01T15:41:22      install                  pkg                Failed
2010-11-01T15:41:54      update                   pkg                Succeeded

("TIME" now shows the time-delta)

t...@tcx2250-05[1031] pkg history -o time,outcome,command -n 5
TIME      OUTCOME     COMMAND
0:00:02   Canceled    /usr/bin/pkg refresh --full
0:00:13   Succeeded   /usr/bin/pkg install pkg5
0:00:13   Succeeded   /usr/bin/pkg install pkg5
0:00:10   Failed      /usr/bin/pkg install package/[email protected],5.11-0.151
0:00:22   Succeeded   /usr/bin/pkg update 
pkg://pkg5-nightly/consolidation/ips/ips-incorporation

(selecting an event)

t...@tcx2250-05[1042]  pkg history -e 2010-11-01T15:41:22
START                    OPERATION                CLIENT             OUTCOME
2010-11-01T15:41:22      install                  pkg                Failed

(finding out why something failed)

t...@tcx2250-05[1043] pkg history -e 2010-11-01T15:41:22 -o time,outcome,reason
TIME      OUTCOME     REASON
0:00:10   Failed      Constrained

(printing BE names and command)

t...@tcx2250-05[1035] pkg history -e 2010-10-13T20:41:05 -o 
time,be,new_be,snapshot,command        
TIME      BE                  NEW BE              SNAPSHOT            COMMAND
0:00:35   hist_polka          hist_ruckus         (None)              
/usr/bin/pkg uninstall --be-name=hist_ruckus iwi

(printing history for a range of dates)

t...@tcx2250-05[1051] pkg history -e 2010-11-01T14:00:00-2010-11-01T15:00:00
START                    OPERATION                CLIENT             OUTCOME
2010-11-01T14:06:34      rebuild-image-catalogs   pkg                Succeeded
2010-11-01T14:06:34      refresh-publishers       pkg                Succeeded
2010-11-01T14:06:34      install                  pkg                Succeeded
2010-11-01T14:19:55      refresh-publishers       pkg                Succeeded
2010-11-01T14:19:55      add-publisher            pkg                Succeeded
2010-11-01T14:19:56      rebuild-image-catalogs   pkg                Succeeded
2010-11-01T14:20:09      set-preferred-publisher  pkg                Succeeded
2010-11-01T14:20:10      update-publisher         pkg                Succeeded
2010-11-01T14:20:10      update-publisher         pkg                Succeeded
2010-11-01T14:21:35      refresh-publishers       pkg                Canceled
2010-11-01T14:21:35      update                   pkg                Canceled
2010-11-01T14:21:42      update                   pkg                Succeeded

(what we see when trying to print columns where that information has not
been recorded in the history xml file, e.g. from older clients)

t...@linn[5239] pkg history -e 2010-02-04T07:35:56 -o 
start,operation,be,new_be,snapshot
START                    OPERATION                BE                  NEW BE    
          SNAPSHOT
2010-02-04T07:35:56      refresh-publishers       (Unknown)           (None)    
          (None)
2010-02-04T07:35:56      image-update             (Unknown)           (None)    
          (None)


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

Reply via email to