Hello,

The CR:
 http://cr.opensolaris.org/~migi/9437_multipart_algorithm_v1/

Fixes the problem:
 http://defect.opensolaris.org/bz/show_bug.cgi?id=9437

The new algorithm produces minimum unique name for the package across all packages in the publisher. If the package is an unique and contains special_category part as a result we will have package name with special category and one more part. The current SPECIAL_CATEGORIES may be adjusted, when the new publisher with renamed packages will be available.
Currently we do have two special categories:

  SPECIAL_CATEGORIES = ["locale", "plugin"]

Examples:
 1: The list of packages:
names = ["1/2/3","4/2/3", "6/5/3", "simple", "2/3/4", "3/4", "4/3", "4/4/4", "1/3/4/5/6"]

 1a: Resulting list of names:
  names = ["1/2/3","4/2/3","5/3","simple","2/3/4","3/4","4/3","4/4","6"]

 1b: If the special categories would be  SPECIAL_CATEGORIES = ["3", "5"]
names = ["1/2/3","4/2/3","6/5/3","simple","2/3/4","3/4","4/3","4/4","1/3/4/5/6"]

 2:
names = ["gnome2/document/locale/hi", "gnome2/locale/hi", "as/as/web/locale/browser/firefox/locale/hi", "as/bs/web/locale/browser/firefox/locale/hi"]

 2a:
names = ["document/locale/hi", "gnome2/locale/hi", "as/web/locale/browser/firefox/locale/hi", "bs/web/locale/browser/firefox/locale/hi"]

Please note that the user will see full package names, if the user is in one of the modes:
 All Publishers (Search)
 All Publishers (Installed)

This is due to the fact that we don't know about all package names in those modes, so we need to show full package name.

TIMING:
This change does not affect overall startup time, which is shown for the opensolaris.org publisher on my box:
Before applying: 2.45807600021seconds
After applying the patch: 2.47144603729 seconds
So the difference is ~ 0.01 seconds.

--
best
Michal Pryc

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

Reply via email to