diff options
author | Hannu Lounento <hannu.lounento@vaisala.com> | 2018-05-24 12:18:37 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-05-29 21:07:16 +0100 |
commit | 2a092f4aec4a8be3a50e1ba19dd4df4b73f50591 (patch) | |
tree | a61a7de0bd76a6c71326b9af3763edcb74a5fe3f /meta/recipes-devtools/i2c-tools | |
parent | ce12d183bb0a3366d37855e18452ac6ee6215be3 (diff) | |
download | poky-2a092f4aec4a8be3a50e1ba19dd4df4b73f50591.tar.gz |
i2c-tools: use update-alternatives
i2cget, i2cset, i2cdump and i2cdetect may also be provided by Busybox
when CONFIG_I2CGET, CONFIG_I2CSET, CONFIG_I2CDUMP and CONFIG_I2CDETECT
are enabled respectively.
Busybox has a priority of 50.
Prior to the patch building core-image-minimal with
IMAGE_INSTALL_append = " busybox"
IMAGE_INSTALL_append = " i2c-tools"
in local.conf 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/usr/sbin/i2cget to /bin/busybox.nosuid since /path/to/poky/build/tmp-glibc/work/qemux86-oe-linux/core-image-minimal/1.0-r0/rootfs/usr/sbin/i2cget exists and is not a link
and similarly for i2cset, i2cdump and i2cdetect when a workspace layer
created by devtool contained
cat workspace/appends/busybox_%.bbappend
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI_append = " file://i2c.cfg"
and
cat workspace/appends/busybox/i2c.cfg
CONFIG_I2CGET=y
CONFIG_I2CSET=y
CONFIG_I2CDETECT=y
CONFIG_I2CDUMP=y
(From OE-Core rev: 391f0fb76c286734cc9be57b825efe02b6999faf)
Signed-off-by: Hannu Lounento <hannu.lounento@vaisala.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/i2c-tools')
-rw-r--r-- | meta/recipes-devtools/i2c-tools/i2c-tools_4.0.bb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/meta/recipes-devtools/i2c-tools/i2c-tools_4.0.bb b/meta/recipes-devtools/i2c-tools/i2c-tools_4.0.bb index 01ac47f611..fe3247d82e 100644 --- a/meta/recipes-devtools/i2c-tools/i2c-tools_4.0.bb +++ b/meta/recipes-devtools/i2c-tools/i2c-tools_4.0.bb | |||
@@ -14,6 +14,8 @@ SRC_URI = "${KERNELORG_MIRROR}/software/utils/i2c-tools/${BP}.tar.gz \ | |||
14 | SRC_URI[md5sum] = "d92a288d70f306d3895e3a7e9c14c9aa" | 14 | SRC_URI[md5sum] = "d92a288d70f306d3895e3a7e9c14c9aa" |
15 | SRC_URI[sha256sum] = "5b60daf6f011de0acb61de57dba62f2054bb39f19961d67e0c91610f071ca403" | 15 | SRC_URI[sha256sum] = "5b60daf6f011de0acb61de57dba62f2054bb39f19961d67e0c91610f071ca403" |
16 | 16 | ||
17 | inherit update-alternatives | ||
18 | |||
17 | EXTRA_OEMAKE = "bindir=${bindir} sbindir=${sbindir} \ | 19 | EXTRA_OEMAKE = "bindir=${bindir} sbindir=${sbindir} \ |
18 | incdir=${includedir} libdir=${libdir} \ | 20 | incdir=${includedir} libdir=${libdir} \ |
19 | mandir=${mandir} \ | 21 | mandir=${mandir} \ |
@@ -34,3 +36,10 @@ RDEPENDS_${PN}-misc = "${PN} perl perl-module-posix \ | |||
34 | perl-module-constant perl-module-file-basename \ | 36 | perl-module-constant perl-module-file-basename \ |
35 | perl-module-fcntl perl-module-strict perl-module-vars \ | 37 | perl-module-fcntl perl-module-strict perl-module-vars \ |
36 | " | 38 | " |
39 | |||
40 | ALTERNATIVE_PRIORITY = "100" | ||
41 | ALTERNATIVE_${PN} = "i2cdetect i2cdump i2cget i2cset" | ||
42 | ALTERNATIVE_LINK_NAME[i2cdetect] = "${sbindir}/i2cdetect" | ||
43 | ALTERNATIVE_LINK_NAME[i2cdump] = "${sbindir}/i2cdump" | ||
44 | ALTERNATIVE_LINK_NAME[i2cget] = "${sbindir}/i2cget" | ||
45 | ALTERNATIVE_LINK_NAME[i2cset] = "${sbindir}/i2cset" | ||