All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe][PATCH] debootstrap: fix runtime failure on nativesdk
@ 2021-06-02  5:46 hongxu
  0 siblings, 0 replies; only message in thread
From: hongxu @ 2021-06-02  5:46 UTC (permalink / raw)
  To: raj.khem; +Cc: openembedded-devel

While calling debootstrap in sdk, if host does not install dpkg package,
the full path calling will fail

Do not hardcode the full path of dpkg, then the sdk's dpkg will be used.

In Yocto, for debootstrap, only dpkg is used, so the fix do not take care
of other utilities (such as /usr/bin/udpkg)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 ...o-not-hardcode-the-full-path-of-dpkg.patch | 33 +++++++++++++++++++
 .../debootstrap/debootstrap_1.0.124.bb        |  1 +
 2 files changed, 34 insertions(+)
 create mode 100644 meta-oe/recipes-devtools/debootstrap/debootstrap/0001-do-not-hardcode-the-full-path-of-dpkg.patch

diff --git a/meta-oe/recipes-devtools/debootstrap/debootstrap/0001-do-not-hardcode-the-full-path-of-dpkg.patch b/meta-oe/recipes-devtools/debootstrap/debootstrap/0001-do-not-hardcode-the-full-path-of-dpkg.patch
new file mode 100644
index 000000000..2a5f23316
--- /dev/null
+++ b/meta-oe/recipes-devtools/debootstrap/debootstrap/0001-do-not-hardcode-the-full-path-of-dpkg.patch
@@ -0,0 +1,33 @@
+From e735fb23f46f0c3c7a1144ba6b4050bfc0015a05 Mon Sep 17 00:00:00 2001
+From: Hongxu Jia <hongxu.jia@windriver.com>
+Date: Wed, 2 Jun 2021 13:34:35 +0800
+Subject: [PATCH] do not hardcode the full path of dpkg
+
+While calling debootstrap in sdk, if host does not install dpkg package,
+the full path calling will fail
+
+Do not hardcode the full path of dpkg, then then sdk's dpkg will be used.
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ debootstrap | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/debootstrap b/debootstrap
+index a3cf3af..5e96c3e 100755
+--- a/debootstrap
++++ b/debootstrap
+@@ -538,7 +538,7 @@ fi
+ 
+ if in_path dpkg && \
+      dpkg --print-architecture >/dev/null 2>&1; then
+-	HOST_ARCH=$(/usr/bin/dpkg --print-architecture)
++	HOST_ARCH=$(dpkg --print-architecture)
+ elif in_path udpkg && \
+      udpkg --print-architecture >/dev/null 2>&1; then
+ 	HOST_ARCH=$(/usr/bin/udpkg --print-architecture)
+-- 
+2.27.0
+
diff --git a/meta-oe/recipes-devtools/debootstrap/debootstrap_1.0.124.bb b/meta-oe/recipes-devtools/debootstrap/debootstrap_1.0.124.bb
index 300c98f91..4fc59adfb 100644
--- a/meta-oe/recipes-devtools/debootstrap/debootstrap_1.0.124.bb
+++ b/meta-oe/recipes-devtools/debootstrap/debootstrap_1.0.124.bb
@@ -8,6 +8,7 @@ SRC_URI  = "\
     http://http.debian.net/debian/pool/main/d/debootstrap/debootstrap_${PV}.tar.gz \
     file://0001-support-to-override-usr-sbin-and-usr-share.patch \
     file://0002-support-to-override-usr-bin-arch-test.patch \
+    file://0001-do-not-hardcode-the-full-path-of-dpkg.patch \
 "
 
 SRC_URI[md5sum] = "8a5e97f60236c3a63f715c056a5f0e29"
-- 
2.27.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-06-02  5:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-02  5:46 [meta-oe][PATCH] debootstrap: fix runtime failure on nativesdk hongxu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.