Greetings, I'm in the process of writing unit tests, and have discovered that action doesn't really do any verification that "required" attributes (such as 'path' for file, directory, etc.) are present. This means you can blithely construct useless actions that break other parts of the system.
I've put a change in place that ensures that "required" attributes (which as far as I can tell is just the key_attr from an action class) is checked for during fromlist and fromstr, and then raises an appropriate ActionError exception. However, given that a user could have already broken manifests on their system, it seems as though checks like these might have to be limited to publication time or enabled through the use of a boolean parameter to fromstr and fromlist. I'm just afraid of a user ending up with a toxic manifest that keeps them from doing anything on their system. The other alternative I can think of is to have the action class still do this validation and raise the appropriate exception, and then have any code that loads manifests choose to ignore them as it wishes. Thoughts? -- Shawn Walker _______________________________________________ pkg-discuss mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
