[OE-core] [PATCH 3/4] update-rc.d: use '-f' option in updatercd_postrm

Chen Qi Qi.Chen at windriver.com
Fri Dec 19 06:21:40 UTC 2014


Use '-f' ('--force') option so that while removing packages using deb,
we don't fail because of the following error:

   update-rc.d: $initd/$bn exists during rc.d purge (use -f to force)

Using '-f' option would make this a warning but continue to execute.

   update-rc.d: $initd/$bn exists during rc.d purge (continuing)

We need this option now because things under /etc/init.d/ are configuration
files by default. As dpkg doesn't remove configuration files when using
'remove', errors appear.

Signed-off-by: Chen Qi <Qi.Chen at windriver.com>
---
 meta/classes/update-rc.d.bbclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/classes/update-rc.d.bbclass b/meta/classes/update-rc.d.bbclass
index bc1aa7d..a9c0323 100644
--- a/meta/classes/update-rc.d.bbclass
+++ b/meta/classes/update-rc.d.bbclass
@@ -48,9 +48,9 @@ fi
 updatercd_postrm() {
 if type update-rc.d >/dev/null 2>/dev/null; then
 	if [ -n "$D" ]; then
-		OPT="-r $D"
+		OPT="-f -r $D"
 	else
-		OPT=""
+		OPT="-f"
 	fi
 	update-rc.d $OPT ${INITSCRIPT_NAME} remove
 fi
-- 
1.9.1




More information about the Openembedded-core mailing list