On 10/19/11 11:34, Drew Fisher wrote:


On 10/19/11 12:21 PM, Ethan Quach wrote:
Drew,

Just a question here but do we need to account for a situation where those env variables were already set in the environment for other purposes? i.e. do we need to record existing values if they existed, and then set them back into place when this chunk is done rather than just clearing them?

We certainly could check for them, but these are not common environment variables to set. We're not checking for their existence with the configure_smf() method, either.

What do you think?  I'm not sure on this one.

Understood about the uncommon usage of those variables, but the question was more around the execution order of other functions during the entirety of the DC process. ie could there, or would there, ever be some other place in the DC process that sets and relies on one of those vars, and then by chance your new code is run, and then when it returns the var is gone? If we know that won't ever happen because reasons XYZ, then that's fine. In general though, it seems like manipulating env vars in the main stream of execution without purposeful intent on its affect to the entire process is subject to looming and/or hard-to-diagnose bugs.


-ethan



-Drew


-ethan


On 10/19/11 10:26, Drew Fisher wrote:
Let the code reviews commence!

Could I please get a code review for

7092599 <http://monaco.us.oracle.com/detail.jsf?cr=7092599> distro-constructor can build invalid LiveCD when svccfg fails

https://cr.opensolaris.org/action/browse/caiman/drewfish/7092599/webrev/

I tested this by building 175 on a host system running 173 (there was an SMF schema change in 174):

<snip detail log>
2011-09-29 17:17:42,853 InstallationLogger DEBUG Executing: ['/usr/sbin/svccfg', 'list', '*desktop-cache*']
2011-09-29 17:17:43,686   InstallationLogger DEBUG
application/desktop-cache/gconf-cache
application/desktop-cache/mime-types-cache
application/desktop-cache/icon-cache
application/desktop-cache/desktop-mime-cache
application/desktop-cache/pixbuf-loaders-installer
application/desktop-cache/input-method-cache


This works because we're now correctly setting all of the proper SMF environment variables, exactly the same way that we do when we import all the services.

Thanks!

-Drew


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


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

Reply via email to