[wpkg-users] 1.0rc1 - reboot

Tomasz Chmielewski mangoo at wpkg.org
Wed Nov 28 10:43:14 CET 2007


Rainer Meier schrieb:
> Hi Tomasz, 
> 
>> grubi schrieb:
>>> <?xml version="1.0" encoding="UTF-8"?>
>>>
>>> <packages>
>>>   <package
>>>      id="net20-Patches"
>>>      name="NET 2.0 Patches"
>>>        revision="1"
>>>      reboot="delayed"
>>>      priority="150"
>>>        execute="once">
>>>             <install cmd="%PACKAGES%\net20-Patches\install.bat" 
>>> />           
>>>   </package>
>>> </packages>
>> Umm, right now, it works on a "command level":
>>
>> NEW: The reboot=true attribute on an exit code forces an immediate 
>> reboot. Unfortunately all following commands are skipped 
>> then. Sometimes 
>>          (maybe even more often) you might like to just set 
>> the package 
>> reboot          flag depending on a command exit code. I 
>> introduced the 
>> support of reboot='delayed' within the command nodes. This allows to 
>> schedule a reboot instead of immediately executing it. The 
>> effect is the 
>> same as setting reboot='true' on package level (reboot after 
>> executing 
>> all comands. However it allows you to leave reboot='false' on package 
>>       level and schedule a reboot based on command exit codes.
>>
>> You can see an example here:
>>
>> http://wpkg.org/Internet_Explorer_6
>>
>>
>>
>> Rainer, wouldn't it make sense to make "delayed" work on a <package 
>> reboot="delayed"> level as well? And schedule a reboot only after all 
>> packages are installed?
> 
> You're right that it probably makes sense to have support for reboot=delayed
> on package level. At least at first look. At second look it might be helpful
> in very few cases only. In case of the referenced Internet Explorer 6
> package I don't see a need for it. I would rather set the package to
> reboot=falsed and the KB* patches to reboot=delayed.

That IE6 was just an example of using reboot="..." for command nodes; 
also IE6 was not necessarily a good example for using the "delayed" 
functionality.


> Supporting reboot=delayed might cause packages depending on the one which
> requires a reboot to fail. Unfortunately such problems can be quite hard to
> trace. I already struggled over quite some packages which just quit the
> installation in case there is an reboot scheduled.

Is it really so?

I imagine that reboot=delayed on a package level would just set some 
internal variable; let's say DELAYEDREBOOT=true.

Upon exit, wpkg.js would check the value of that variable:

   if DELAYEDREBOOT set to true -> reboot, exit(3010)

How could it possibly do any wrong to package dependencies?

If any previous package schedules an immediate reboot, than of course we 
don't have to worry about DELAYEDREBOOT value anymore.

If no previous package scheduled an immediate reboot, then with 
reboot=delayed we schedule a reboot *after* all actions are done.

I don't see where it could do more harm than reboot=false.

Correct me if I'm wrong.


-- 
Tomasz Chmielewski
http://wpkg.org



Easy Software Deployment >> http://wpkg.org
_______________________________________________
wpkg-users mailing list
wpkg-users at lists.wpkg.org
http://lists.wpkg.org/mailman/listinfo/wpkg-users



More information about the wpkg-users mailing list