On 01/21/11 06:10 PM, Bart Smaalders wrote:
http://cr.opensolaris.org/~barts/17757/

13054 solver could emit a directed error message for over-revved
incorporated pkgs
17757 pkg solver internationalizes its trim db strings too early,
reducing performance

src/modules/client/api_errors.py:
  copyright update needed

src/modules/client/pkg_solver.py:
  lines 43, 53: nit: add newline here

  line 261: nit: s/#/# /

  line 549: s/command line/per user request/ or
            s/command line/based on user input/ ?

  line 644: nit: why assign and then raise?  Why not just raise?

  line 1025: xxx?

  line 1061: nit: should 270, 281, 1647 have single quotes around {0}
             too?

  lines 1119, 1127, 1135, : s/=/ = /

  line 1146, 1149: I'm sure it's intentional that obsolete_ok is
                   explicitly False in the first case and a passthru
                   in the other, but can you add a comment explaining
                   why?

  lines 1165-1167: When is this case ever hit?  If it's an unrecognised
                   dependency type, an action error would have been
                   raised during parsing, so this would never be
                   executed.  Only case I can think of is if you
                   installed packages with a dependency type only
                   supported with a new version of pkg, and then later
                   tried to use an older version to update or uninstall
                   those packages. (Eek.)

  lines 1176, 1275: extra newline?

  line 1238: s/lists/list/ ?

  line 1276: should probably be @staticmethod (drop the self)

  line 1318: s/=_/= _/

  line 1319: s/ reason /reason/

  line 1478: extra newline?

  line 1592: ...than {0}"), ", ".join(ranked - pkg_name_pub) ?

  line 1618: s/formating/formatting/; also it looks like reason can be
             a string too; no tuple required

  line 1632:  So, completely optional, but if you changed __trim_dict
      into a collections.defaultdict, you could dump the function call,
      and this would be slightly faster.  So:

      line 67: self.__trim_dict = collections.defaultdict(set)
      line 1632: self.__trim_dict[fmri].add(tup)

      The same applies for any other dictionaries where you're always
      using setdefault for.  The only reason to not do this is if you
      want KeyError to be raised if 'fmri' doesn't exist in __trim_dict.

src/modules/misc.py:
  copyright update needed


Last comment is whether these changes now show the user the rollup of their install holds as part of the plan output? For example, something like this:

# pkg update -n
Updating:
  [email protected] -> [email protected]

...or if entire is not installed:

# pkg update-n
Updating:
consolidation/nvidia/[email protected] -> consolidation/nvidia/[email protected] consolidation/osnet/[email protected] -> consolidation/osnet/[email protected]


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

Reply via email to