Shawn,
Please consider these comments.
client.py - it would be nice if eventually the start_operation calls for
install, uninstall, image-update, etc. could be done from the image
class rather than from client.py. Having these in client.py will mean
that any other clients of the IPS API will need to insert the
stop_operation calls for those operations.
pkg.1.txt - the description of the history command doesn't say what the
-H option is for.
history.py
line 96: why doesn't clear() clear the image dir? Is this to allow
multiple operations on a single image to happen? What happens if a
process has multiple image objects, and it flips back and forth between
operations on them?
portable/os_darwin.py - this file needs to import get_userid too.
Thanks.
Tom
Shawn Walker wrote:
Greetings,
The following webrev contains changes necessary to implement these
(known) bug entries:
1449 pkg requires operational history
webrev:
http://cr.opensolaris.org/~swalker/pkg-1449/
gui diff (separate from webrev):
http://cr.opensolaris.org/~swalker/pkg-1449/gui.patch
Sample history output (sorted based on mtime of each history entry file):
Short format:
http://cr.opensolaris.org/~swalker/pkg-1449/short.txt
Long format:
http://cr.opensolaris.org/~swalker/pkg-1449/long.txt
Notes
=====
* The command column doesn't show the operation performed in the short
format, which means that command is of limited value when the gui has
performed an operation. I've thought of adding the "operation" column
to the short format to work around this limitation.
* pkg history output is sorted by file modification time.
* There is currently no limit on the amount of history entries.
Eventually, we could implement a policy that limited the history based
on a certain number of entries as an image attribute. I didn't want to
bite off any more than this for the initial implementation. Thus, I
have filed bug 3304 for that.
* The GUI changes were done as a diff against my changes + Michal Pryc's
pending patch for bug 3193.
Change Summary
==============
* Implemented new history module to support the storage information
related to operations that modify an image and to support better
post-mortem analysis.
* Stores each history entry in an XML file in the new /history directory
under image.imgdir.
* History entry files are named after the pattern:
%Y%m%dT%H%M%SZ-{random_sequence}.xml
* Has hooks in cli and gui to record image modifying operations (this
includes changes to authority, mirrors, etc.).
* Will attempt to record any traceback information or errors if an
operation ends unsuccessfully (defined as a non-zero return code or an
exception occurring).
* Two new test suites were added - one for the api, and one for the
pkg(1) history command.
Cheers,
begin:vcard
fn:Tom Mueller
n:Mueller;Tom
org:Sun Microsystems, Inc.;SWI Install/Update Software
adr:;;21915 Hillandale Dr;Elkhorn;NE;68022;USA
email;internet:[EMAIL PROTECTED]
title:Senior Staff Engineer
tel;work:877-250-4011
tel;fax:877-250-4011
tel;home:402-916-9943
x-mozilla-html:TRUE
version:2.1
end:vcard
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss