On 07/01/11 14:22, Brock Pytlik wrote:
Webrev:
https://cr.opensolaris.org/action/browse/pkg/bpytlik/18441-v4

This makes freeze state be stored in the catalog. Not surprisingly, this
means that 'pkg freeze foo' went from being essentially instant to
taking 15 seconds while we rebuild the index.

Incremental diff:
diff -r 4a3be3eee8c8 src/client.py
--- a/src/client.py Fri Jun 24 18:10:39 2011 -0700
+++ b/src/client.py Fri Jul 01 14:22:31 2011 -0700
@@ -2655,23 +2655,29 @@
msg(lic)
continue

- state = ""
+ state = "%s"
+ if api.PackageInfo.INSTALLED in pi.states:
+ state = state % _("Installed")
+ elif api.PackageInfo.UNSUPPORTED in pi.states:
+ state = state % _("Unsupported")
+ else:
+ state = state % _("Not installed")
+

Why bother with the '%s' instead of just assigning the string? I don't see the need.

+ lparen = False
if api.PackageInfo.OBSOLETE in pi.states:
- state = _("Obsolete")
+ state += " (%s" % _("Obsolete")
+ print >> sys.stderr, "got obsolete state"

^^^ leftover debugging

Otherwise, LGTM. Although I would either file a bug or mention to the GUI team that they can now take advantage of the frozen state bit from PackageInfo.states.

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

Reply via email to