diff options
author | hongxu <hongxu.jia@windriver.com> | 2021-01-16 11:47:19 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-01-16 22:39:36 +0000 |
commit | c0211ff9f0a73f99caec37d90691dd0e4de9d843 (patch) | |
tree | af416b2401a020e946c29196ebfd2ec61529752b /meta/recipes-devtools/dpkg | |
parent | 92a68c5ea46d879d78dfd7e2b70a3ce90b66d0df (diff) | |
download | poky-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/dpkg')
-rw-r--r-- | meta/recipes-devtools/dpkg/dpkg.inc | 13 |
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 | ||
28 | EXTRA_OECONF_append_class-target = " --disable-update-alternatives DEB_HOST_ARCH=${DPKG_ARCH}" | 28 | EXTRA_OECONF_append_class-target = " --disable-update-alternatives DEB_HOST_ARCH=${DPKG_ARCH}" |
29 | EXTRA_OECONF_append_class-nativesdk = " --disable-update-alternatives DEB_HOST_ARCH=${DPKG_ARCH}" | ||
29 | 30 | ||
30 | PACKAGECONFIG = "liblzma" | 31 | PACKAGECONFIG = "liblzma" |
31 | PACKAGECONFIG[liblzma] = "--with-liblzma,--without-liblzma, xz" | 32 | PACKAGECONFIG[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 | ||
55 | PROV = "virtual/update-alternatives" | 56 | PROV = "virtual/update-alternatives" |
56 | PROV_class-native = "" | 57 | PROV_class-native = "" |
58 | PROV_class-nativesdk = "" | ||
57 | 59 | ||
58 | PROVIDES += "${PROV}" | 60 | PROVIDES += "${PROV}" |
59 | 61 | ||
@@ -93,7 +95,8 @@ ALTERNATIVE_${PN}-start-stop = "start-stop-daemon" | |||
93 | ALTERNATIVE_LINK_NAME[start-stop-daemon] = "${sbindir}/start-stop-daemon" | 95 | ALTERNATIVE_LINK_NAME[start-stop-daemon] = "${sbindir}/start-stop-daemon" |
94 | ALTERNATIVE_PRIORITY = "100" | 96 | ALTERNATIVE_PRIORITY = "100" |
95 | 97 | ||
96 | RDEPENDS_${PN} += "${PN}-start-stop" | 98 | EXTRA_RDPENDS = "ldconfig" |
99 | EXTRA_RDPENDS_libc-musl = "" | ||
100 | RDEPENDS_${PN} += "${PN}-start-stop ${EXTRA_RDPENDS}" | ||
97 | 101 | ||
98 | 102 | BBCLASSEXTEND = "native nativesdk" | |
99 | BBCLASSEXTEND = "native" | ||