[oe-commits] [meta-openembedded] 12/48: vlan: use update-alternatives for vconfig

git at git.openembedded.org git at git.openembedded.org
Tue May 29 15:49:22 UTC 2018


This is an automated email from the git hooks/post-receive script.

khem pushed a commit to branch master-next
in repository meta-openembedded.

commit cb7b35a4f9f93ecddbb245e32982d3674cef334d
Author: Hannu Lounento <hannu.lounento at vaisala.com>
AuthorDate: Thu May 17 04:27:22 2018 +0000

    vlan: use update-alternatives for vconfig
    
    Busybox also provides the command 'vconfig' when CONFIG_VCONFIG is
    enabled.
    
    Busybox has a priority of 50.
    
    Prior to the patch running
    
        bitbake core-image-minimal
    
    produced the warnings
    
        WARNING: core-image-minimal-1.0-r0 do_rootfs: busybox.postinst returned 1, marking as unpacked only, configuration required on target.
        WARNING: core-image-minimal-1.0-r0 do_rootfs: Intentionally failing postinstall scriptlets of ['busybox'] to defer them to first boot is deprecated. Please place them into pkg_postinst_ontarget_${PN} ().
        If deferring to first boot wasn't the intent, then scriptlet failure may mean an issue in the recipe, or a regression elsewhere.
        Details of the failure are in /path/to/poky/build/tmp-glibc/work/qemux86-oe-linux/core-image-minimal/1.0-r0/temp/log.do_rootfs.
        WARNING: core-image-minimal-1.0-r0 do_rootfs: [log_check] core-image-minimal: found 1 warning message in the logfile:
        [log_check] WARNING: Intentionally failing postinstall scriptlets of ['busybox'] to defer them to first boot is deprecated. Please place them into pkg_postinst_ontarget_${PN} ().
    
    where log.do_rootfs contained
    
        update-alternatives: Error: not linking /path/to/poky/build/tmp-glibc/work/qemux86-oe-linux/core-image-minimal/1.0-r0/rootfs/sbin/vconfig to /bin/busybox.nosuid since /path/to/poky/build/tmp-glibc/work/qemux86-oe-linux/core-image-minimal/1.0-r0/rootfs/sbin/vconfig exists and is not a link
    
    when a workspace layer created by devtool contained
    
        $ cat workspace/appends/busybox_%.bbappend
        FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
    
        SRC_URI_append = " file://vconfig.cfg"
    
    and
    
        $ cat workspace/appends/busybox/vconfig.cfg
        CONFIG_VCONFIG=y
    
    and local.conf contained
    
        $ tail -n2 conf/local.conf
        IMAGE_INSTALL_append = " busybox"
        IMAGE_INSTALL_append = " vlan"
    
    Signed-off-by: Hannu Lounento <hannu.lounento at vaisala.com>
    Signed-off-by: Khem Raj <raj.khem at gmail.com>
---
 meta-networking/recipes-connectivity/vlan/vlan_1.9.bb | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/meta-networking/recipes-connectivity/vlan/vlan_1.9.bb b/meta-networking/recipes-connectivity/vlan/vlan_1.9.bb
index bd55efc..7eea5d1 100644
--- a/meta-networking/recipes-connectivity/vlan/vlan_1.9.bb
+++ b/meta-networking/recipes-connectivity/vlan/vlan_1.9.bb
@@ -14,6 +14,8 @@ SRC_URI[sha256sum] = "3b8f0a1bf0d3642764e5f646e1f3bbc8b1eeec474a77392d9aeb486884
 
 S = "${WORKDIR}/${BPN}"
 
+inherit update-alternatives
+
 EXTRA_OEMAKE = "-e MAKEFLAGS="
 
 # comment out MakeInclude in Makefile which sets build environment
@@ -30,3 +32,7 @@ do_install () {
     install -d ${D}/${base_sbindir}
     install -m 0755 ${S}/vconfig ${D}/${base_sbindir}/
 }
+
+ALTERNATIVE_PRIORITY = "100"
+ALTERNATIVE_${PN} = "vconfig"
+ALTERNATIVE_LINK_NAME[vconfig] = "${base_sbindir}/vconfig"

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list