Jack,

On 08/14/10 01:55, Jack Schwartz wrote:
 Hi Dermot.

I think I found an issue regarding the "install" action processing in auto_ddu_lib.c. I know that software.dtd sets "install" as a default. However, as is, auto_ddu_lib.c will be operating on an unprocessed manifest (before xmllint is run), and so no default will have been set up yet.

auto_ddu_lib.c assumes that either install or noinstall has been setup. It will complain if neither action is present.

One solution may be to do the validation before calling auto_ddu_lib. (ai_du_get_and_install() and ai_du_install()). The reason why auto_ddu_lib worked on an unvalidated manifest was because part of validation included verifying the target disk existed. I presume this now is checked later by the installer itself; it won't be part of xmllint validation anyway and so validation (and setting of defaults) can be done before auto_ddu_lib runs.

If validation can't be run before auto_ddu_lib, then just putback what was in auto_ddu_lib before regarding validating noinstall. If nothing was there, it assumed "install".

    Thanks,
    Jack


Actually, I decided to go with your preferred solution - move the validation
(and hence filling in of attribute defaults) to before auto_ddu_lib is called.

I noticed that other than software_data/action, there is also software_data/type and addall, which get default values, and which are accessed by auto_ddu_lib. Although the code correctly handles if addall is not specified, and the default
value for type (IPS) is not valid for ddu anyway.  But ensuring the manifest
is valid as has default attributes filled in still seemed like the right thing to do.


Thanks again,
- Dermot


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

Reply via email to