Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 1/3] dpkg: add nativesdk support
@ 2021-01-15  9:45 hongxu
  2021-01-15  9:45 ` [PATCH 2/3] apt: " hongxu
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: hongxu @ 2021-01-15  9:45 UTC (permalink / raw)
  To: openembedded-core

- 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

- 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]

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 meta/recipes-devtools/dpkg/dpkg.inc | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-devtools/dpkg/dpkg.inc b/meta/recipes-devtools/dpkg/dpkg.inc
index 04fe85c4a8..3325159299 100644
--- a/meta/recipes-devtools/dpkg/dpkg.inc
+++ b/meta/recipes-devtools/dpkg/dpkg.inc
@@ -26,6 +26,7 @@ EXTRA_OECONF = "\
 		"
 
 EXTRA_OECONF_append_class-target = " --disable-update-alternatives DEB_HOST_ARCH=${DPKG_ARCH}"
+EXTRA_OECONF_append_class-nativesdk = " --disable-update-alternatives DEB_HOST_ARCH=${DPKG_ARCH}"
 
 PACKAGECONFIG = "liblzma"
 PACKAGECONFIG[liblzma] = "--with-liblzma,--without-liblzma, xz"
@@ -46,14 +47,15 @@ do_install_append () {
 	if [ "${PN}" = "dpkg-native" ]; then
 		# update-alternatives doesn't have an offline mode
 		rm ${D}${bindir}/update-alternatives
-		sed -i -e 's|^#!.*${bindir}/perl-native.*/perl|#!/usr/bin/env nativeperl|' ${D}${bindir}/dpkg-*
+		sed -i -e 's|^#!.*${STAGING_BINDIR_NATIVE}/perl-native.*/perl|#!/usr/bin/env nativeperl|' ${D}${bindir}/dpkg-*
 	else
-		sed -i -e 's|^#!.*${bindir}/perl-native.*/perl|#!/usr/bin/env perl|' ${D}${bindir}/dpkg-*
+		sed -i -e 's|^#!.*${STAGING_BINDIR_NATIVE}/perl-native.*/perl|#!/usr/bin/env perl|' ${D}${bindir}/dpkg-*
 	fi
 }
 
 PROV = "virtual/update-alternatives"
 PROV_class-native = ""
+PROV_class-nativesdk = ""
 
 PROVIDES += "${PROV}"
 
@@ -93,7 +95,7 @@ ALTERNATIVE_${PN}-start-stop = "start-stop-daemon"
 ALTERNATIVE_LINK_NAME[start-stop-daemon] = "${sbindir}/start-stop-daemon"
 ALTERNATIVE_PRIORITY = "100"
 
-RDEPENDS_${PN} += "${PN}-start-stop"
+RDEPENDS_${PN} += "${PN}-start-stop ldconfig"
 
 
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
-- 
2.18.2


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2021-01-16  3:49 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-15  9:45 [PATCH 1/3] dpkg: add nativesdk support hongxu
2021-01-15  9:45 ` [PATCH 2/3] apt: " hongxu
2021-01-15 11:26   ` [OE-core] " Richard Purdie
     [not found]   ` <165A643B5E417599.21794@lists.openembedded.org>
2021-01-15 16:51     ` Richard Purdie
2021-01-16  2:49       ` hongxu
2021-01-15  9:45 ` [PATCH 3/3] deb: do not insert feed uris if apt not installed hongxu
2021-01-15 22:21   ` [OE-core] " Richard Purdie
2021-01-16  2:46     ` hongxu
2021-01-16  3:49     ` [PATCH V2] " hongxu
2021-01-15 22:15 ` [OE-core] [PATCH 1/3] dpkg: add nativesdk support Richard Purdie
2021-01-16  2:50   ` hongxu
2021-01-16  3:47   ` [PATCH V2] " hongxu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox