summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorhongxu <hongxu.jia@windriver.com>2021-01-16 11:47:19 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-01-16 22:39:36 +0000
commitc0211ff9f0a73f99caec37d90691dd0e4de9d843 (patch)
treeaf416b2401a020e946c29196ebfd2ec61529752b /meta/recipes-devtools
parent92a68c5ea46d879d78dfd7e2b70a3ce90b66d0df (diff)
downloadpoky-c0211ff9f0a73f99caec37d90691dd0e4de9d843.tar.gz
dpkg: add nativesdk support
- Add nativesdk support and override EXTRA_OECONF and PROV for nativesdk - Replace ${bindir} with ${STAGING_BINDIR_NATIVE} for perl-native shebang to fix QA error of shebang too long in nativesdk build - Conditionally (except musl) add ldconfig to runtime depends to fix the following issue on target [snip] ... dpkg: warning: 'ldconfig' not found in PATH or not executable dpkg: error: 1 expected program not found in PATH or not executable Note: root's PATH should usually contain /usr/local/sbin, /usr/sbin and/sbin E: Sub-process /usr/bin/dpkg returned an error code (2) [snip] (From OE-Core rev: a69eee72b25411880146821fe4ec07be4704afee) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/dpkg/dpkg.inc13
1 files changed, 8 insertions, 5 deletions
diff --git a/meta/recipes-devtools/dpkg/dpkg.inc b/meta/recipes-devtools/dpkg/dpkg.inc
index 04fe85c4a8..3419aa56bf 100644
--- a/meta/recipes-devtools/dpkg/dpkg.inc
+++ b/meta/recipes-devtools/dpkg/dpkg.inc
@@ -26,6 +26,7 @@ EXTRA_OECONF = "\
26 " 26 "
27 27
28EXTRA_OECONF_append_class-target = " --disable-update-alternatives DEB_HOST_ARCH=${DPKG_ARCH}" 28EXTRA_OECONF_append_class-target = " --disable-update-alternatives DEB_HOST_ARCH=${DPKG_ARCH}"
29EXTRA_OECONF_append_class-nativesdk = " --disable-update-alternatives DEB_HOST_ARCH=${DPKG_ARCH}"
29 30
30PACKAGECONFIG = "liblzma" 31PACKAGECONFIG = "liblzma"
31PACKAGECONFIG[liblzma] = "--with-liblzma,--without-liblzma, xz" 32PACKAGECONFIG[liblzma] = "--with-liblzma,--without-liblzma, xz"
@@ -46,14 +47,15 @@ do_install_append () {
46 if [ "${PN}" = "dpkg-native" ]; then 47 if [ "${PN}" = "dpkg-native" ]; then
47 # update-alternatives doesn't have an offline mode 48 # update-alternatives doesn't have an offline mode
48 rm ${D}${bindir}/update-alternatives 49 rm ${D}${bindir}/update-alternatives
49 sed -i -e 's|^#!.*${bindir}/perl-native.*/perl|#!/usr/bin/env nativeperl|' ${D}${bindir}/dpkg-* 50 sed -i -e 's|^#!.*${STAGING_BINDIR_NATIVE}/perl-native.*/perl|#!/usr/bin/env nativeperl|' ${D}${bindir}/dpkg-*
50 else 51 else
51 sed -i -e 's|^#!.*${bindir}/perl-native.*/perl|#!/usr/bin/env perl|' ${D}${bindir}/dpkg-* 52 sed -i -e 's|^#!.*${STAGING_BINDIR_NATIVE}/perl-native.*/perl|#!/usr/bin/env perl|' ${D}${bindir}/dpkg-*
52 fi 53 fi
53} 54}
54 55
55PROV = "virtual/update-alternatives" 56PROV = "virtual/update-alternatives"
56PROV_class-native = "" 57PROV_class-native = ""
58PROV_class-nativesdk = ""
57 59
58PROVIDES += "${PROV}" 60PROVIDES += "${PROV}"
59 61
@@ -93,7 +95,8 @@ ALTERNATIVE_${PN}-start-stop = "start-stop-daemon"
93ALTERNATIVE_LINK_NAME[start-stop-daemon] = "${sbindir}/start-stop-daemon" 95ALTERNATIVE_LINK_NAME[start-stop-daemon] = "${sbindir}/start-stop-daemon"
94ALTERNATIVE_PRIORITY = "100" 96ALTERNATIVE_PRIORITY = "100"
95 97
96RDEPENDS_${PN} += "${PN}-start-stop" 98EXTRA_RDPENDS = "ldconfig"
99EXTRA_RDPENDS_libc-musl = ""
100RDEPENDS_${PN} += "${PN}-start-stop ${EXTRA_RDPENDS}"
97 101
98 102BBCLASSEXTEND = "native nativesdk"
99BBCLASSEXTEND = "native"