All,

> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf
> Of Bryan Evenson
> Sent: Tuesday, April 14, 2015 11:26 AM
> To: [email protected]
> Subject: [OE-core] sysvinit upgrade woes
> 
> I am using opkg for package management and sysvinit for init.  I am testing a
> large jump on an upgrade and I have been having a few issues.  One issue I
> have traced to sysvinit's upgrade, but I'm unsure how to remedy the
> solution.
> 
> At some point during the upgrade process, opkg records what the new
> version is of all the packages getting installed.  However, when I upgrade
> sysvinit causes sysvinit to restart before opkg has recorded which packages
> were just installed.  So opkg thinks that it didn't upgrade anything even
> though all packages were upgraded.  I verified that if I call "opkg upgrade" 
> for
> all packages that require upgrade except for sysvinit that opkg correctly
> records which packages were upgraded.  However, the end user doesn't
> have that kind of control, so upgrading in this manner is not an option.
> 
> Has anyone else seen a similar issue?  Any ideas on how to hold off sysvinit
> from restarting until after opkg has finished recording its information?
> 

I've found the problem but don't yet have a good solution.  At the end of the 
sysvinit-inittab pkg_postinst script is the line:

        kill -HUP 1

This kills init before opkg has finished doing its job.  On my system, I've 
added a .bbappend with a pk_postinst script as follows for items that require a 
reboot after installation:

    touch /var/run/reboot-required
    echo "${PN}" >>/var/run/reboot-required.pkgs

After my system performs firmware upgrade, it checks if 
/var/run/reboot-required exists and then reboots the system.  So on my system, 
I changed the pkg_postinst script for sysvinit-inittab to replace the "kill 
-HUP 1" with the reboot required notations.

Is there some suitable solution that would be reasonable to change in the 
sysvinit-inittab recipe that would work for other people?

Regards,
Bryan

> Thanks,
> Bryan
> --
> _______________________________________________
> Openembedded-core mailing list
> [email protected]
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
-- 
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to