public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] isar-bootstrap: preserve environment in sudo'ed debootstrap call
@ 2018-09-13 12:20 Cedric Hombourger
  2018-09-13 12:36 ` Henning Schild
  0 siblings, 1 reply; 10+ messages in thread
From: Cedric Hombourger @ 2018-09-13 12:20 UTC (permalink / raw)
  To: isar-users; +Cc: Cedric Hombourger

Make bitbake add proxy environment variables and preserve them when
calling debootstrap under sudo. This is required to get user-defined
proxies used while bootstraping Isar.

Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
---
 meta/recipes-core/isar-bootstrap/isar-bootstrap.inc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
index 4010307..a936e7f 100644
--- a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
+++ b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
@@ -171,7 +171,8 @@ isar_bootstrap() {
         esac
         shift
     done
-    sudo flock "${ISAR_BOOTSTRAP_LOCK}" -c "\
+    E="${@bb.utils.export_proxies(d)}"
+    sudo -E flock "${ISAR_BOOTSTRAP_LOCK}" -c "\
         set -e
         if [ ! -e "${DEPLOY_ISAR_BOOTSTRAP}" ]; then
             if [ -e "${ROOTFSDIR}" ]; then
@@ -179,7 +180,6 @@ isar_bootstrap() {
                umount -l "${ROOTFSDIR}/proc" || true
                rm -rf "${ROOTFSDIR}"
             fi
-            E="${@bb.utils.export_proxies(d)}"
             if [ ${IS_HOST} ]; then
                 ${DEBOOTSTRAP} --verbose \
                                --variant=minbase \
-- 
2.11.0


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

end of thread, other threads:[~2018-09-25 17:39 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-13 12:20 [PATCH] isar-bootstrap: preserve environment in sudo'ed debootstrap call Cedric Hombourger
2018-09-13 12:36 ` Henning Schild
2018-09-13 12:42   ` Hombourger, Cedric
2018-09-13 12:46     ` [PATCH v2] " Cedric Hombourger
2018-09-13 13:09       ` Jan Kiszka
2018-09-13 13:15         ` Hombourger, Cedric
2018-09-13 13:37           ` Henning Schild
2018-09-13 16:17             ` chombourger
2018-09-25 10:05               ` chombourger
2018-09-25 17:39       ` Maxim Yu. Osipov

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