[wpkg-users] WPKG 1.1.0 reboot loop during upgrade

Mark Cooke M.P.Cooke at bham.ac.uk
Tue Jul 7 15:54:54 CEST 2009


> -----Original Message-----
> From: Rainer Meier [mailto:r.meier at wpkg.org] 
> Sent: 07 July 2009 13:18
> 
> Hi Mark,
> 
> Mark Cooke wrote:
> > I have just provoked a slightly unexpected behaviour with 
> v1.1.0 of wpkg.js
> > 
> > Conditions:
> > 
> > 1. Package requires a reboot after it is installed or 
> upgraded (removed &
> > re-installed).  I have the reboot condition set in the 
> install/upgrade
> > section for specific exit conditions.
> > 
> > 2. WPKG Check conditions between the existing version and 
> updated version
> > are the same.
> > 
> > 3. To do the upgrade, I just increased the revision from 1 to 2.
> > 
> > 
> > WPKG logs indicate a successful upgrade, with an immediate 
> reboot.  However,
> > on the next reboot, the revision check fails.  The 
> implication is that
> > requesting an immediate reboot during an upgrade causes a 
> reboot before
> > wpkg.xml has been rewritten with the successful revision data.
> > 
> > Is this a bug, or am I misunderstanding ?
> 
> It seems you're hitting a very special situation. Commands 
> which require an
> immediate reboot are usually commands which cannot finish 
> without rebooting and
> therefore it makes no sense for WPKG to verify if a package is
> installed/upgraded correctly before this reboot was done.

> I think in your case you should schedule a postponed or 
> delayed reboot for your
> command instead of an immediate one (reboot="delayedReboot"). 
> This makes sure
> all upgrade commands are run before the reboot takes place.

Dear Rainer,

I've switched the package to use reboot="delayed" (having ploughed through
the source when reboot="delayedReboot" didn't cause a reboot), and this does
exactly what I needed - a reboot at the end of the specific package
installation, but after having updated the wpkg.xml file.

> The immediate reboot should be used only if a command requies 
> a one-time reboot
> and it will exit with a different code on next execution.

Thanks for this clarification.  I didn't understand the use of this
immediate reboot was for this situation, and I believed that 'reboot=true'
was esentially what 'reboot="delayed"' does.  It is time for me to search
and replace reboot=true with reboot=delayed.


By the way, did reboot=true always restart immediately in earlier versions
of WPKG ?  I'm a bit surprised I didn't see this situation with 0.9, but it
is possible it didn't arise with how I was packaging programs then.

<snip example of workaround>

Thanks for the rapid feedback.

Cheers,

Mark

PS. Thanks to everyone contributing to WPKG - it is a very useful tool.




More information about the wpkg-users mailing list