[oe] [PATCH][RFC] update-rc.d.bbclass vs dpkg issues

Jeremy Lainé jeremy.laine at bolloretelecom.eu
Fri Oct 23 08:09:25 UTC 2009


Having recently switch from opkg to dpkg, I encountered some problems when upgrading
packages which use the update-rc.d class. The problem are that update-rc.d :

a/ unconditionally calls "${INIT_D_DIR}/${INITSCRIPT_NAME} stop" in the prerm script. This
is wrong, it should only do so when the prerm script is called for the "upgrade" and
"remove" steps.

b/ unconditionally calls "update-rc.d $OPT ${INITSCRIPT_NAME} remove" in the postrm
script. This is wrong, it should only do so when the prerm script is called for the
"purge" step. However, "opkg" does not seem to support the "purge" step so I suggest
calling it both for the "remove" and "purge" steps, after checking that the init script no
longer exists.

You can find a description of how maintainer scripts are called by dpkg at:

http://www.debian.org/doc/debian-policy/ch-maintainerscripts.html

Attached is a patch which fixes both issues. I'd appreciate comments on this one as
update-rc.d.bbclass is widely used.

-- 
Jeremy LAINE
Bolloré telecom | 11bis, rue Scribe | F-75009 Paris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: update-rc-d-class.patch
Type: text/x-diff
Size: 954 bytes
Desc: not available
URL: <http://lists.openembedded.org/pipermail/openembedded-devel/attachments/20091023/278b17fe/attachment-0002.bin>


More information about the Openembedded-devel mailing list