Patchwork [CONSOLIDATED,PULL,03/10] chkconfig: remove link for update-alternatives to disambiguate

mail settings
Submitter Saul Wold
Date Aug. 11, 2011, 4:29 p.m.
Message ID <>
Download mbox | patch
Permalink /patch/9617/
State New, archived
Headers show


Saul Wold - Aug. 11, 2011, 4:29 p.m.
From: Xiaofeng Yan <>

[YOCTO #936]
"update-alternatives" installed: one in /usr/sbin from chkconfig \
(symlinked to "alternatives"), and the other in /usr/bin \
from update-alternatives-cworth.
It appears for whatever reason that the one from chkconfig is run \
during postinst processing but if you run the script from the command \
line it gets the other one.
this is due to differences in the PATH environment variable.

The following is the sequence to call scripts after kernel booting
     -->S98configure(call rpm-postinstall)
        #"/usr/sbin" is found prior to "/usr/bin", so update-alternatives from chkconfig is run in this script
  -->profile(profile:4:PATH="/usr/local/bin:/usr/bin:/bin" profile:15: PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin)
  #"/usr/bin/" is found prior to "/usr/sbin", so update-alternatives from update-alternatives-cworth is run in this script

So I remove the symlink (update-alternatives linked to chkconfig). The one from update-alternatives-cworth is left alone.

Signed-off-by: Xiaofeng Yan <>
 .../recipes-extended/chkconfig/ |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)


diff --git a/meta/recipes-extended/chkconfig/ b/meta/recipes-extended/chkconfig/
index 659f964..6dc8a0e 100644
--- a/meta/recipes-extended/chkconfig/
+++ b/meta/recipes-extended/chkconfig/
@@ -12,7 +12,7 @@  LIC_FILES_CHKSUM = "file://COPYING;md5=5574c6965ae5f583e55880e397fbb018"
 DEPENDS = "libnewt popt"
-PR = "r0"
+PR = "r1"
 SRC_URI = "${BPN}-${PV}.tar.bz2"
@@ -23,4 +23,5 @@  inherit autotools gettext
 do_install_append() {
     mkdir -p ${D}/etc/chkconfig.d
+    rm -f ${D}/usr/sbin/update-alternatives