On 02/ 9/10 05:48 AM, Michal Pryc wrote:
Hello,

The CR:
http://cr.opensolaris.org/~migi/14454_publisher_auto_configuration_v1/

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

This is the webrev which was originaly prepared by John. It adds the
auto publisher configuration support for the GUI.

This changeset doesn't appear to have anything to do with the new auto configuration functionality provided by the API. It only handles the possible exceptions that might be raised as part of the additional configuration validation.

Perhaps the bug should have been titled "handle publisher validation exceptions"?


gui/modules/repository.py:

You may need to address these comments after the release, but here they are for reference:

line 553: The publisher object checks the prefix when you set it and raises an appropriate exception. The misc module is not an official part of the client API and you shouldn't use it here. The desired path for validation when working with objects is to use the object and try to set the properties and catch the exceptions instead of spreading out the validation logic. This insulates you from changes in the validation that may happen later.

line 556-559: The API now has full duplicate checking in place for both add and update, so you shouldn't need to do this sort of validation here. You'll get an appropriate DuplicatePublisher exception if you try to add a publisher that doesn't have a unique prefix or alias, and likewise if you try to change the prefix or alias of an existing publisher to that used by another.

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

Reply via email to