From: Jan Kiszka <jan.kiszka@web.de>
To: isar-users <isar-users@googlegroups.com>
Subject: [PATCH] Refresh /etc/resolv.conf on partial rebuilds
Date: Sat, 10 Nov 2018 18:35:47 +0100 [thread overview]
Message-ID: <8937d771-52f0-750c-61f3-25963d8e6a94@web.de> (raw)
From: Jan Kiszka <jan.kiszka@siemens.com>
This addresses the scenario "mobile build host" where the resolv.conf as
once generated during bootstrap and then propagated into the
buildchroots as well the image rootfs may have become stale.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
meta/classes/buildchroot.bbclass | 6 +++++-
meta/classes/isar-bootstrap-helper.bbclass | 3 +++
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/meta/classes/buildchroot.bbclass b/meta/classes/buildchroot.bbclass
index 870d27c..78e21d9 100644
--- a/meta/classes/buildchroot.bbclass
+++ b/meta/classes/buildchroot.bbclass
@@ -29,5 +29,9 @@ buildchroot_do_mounts() {
mount --bind ${DL_DIR} ${BUILDCHROOT_DIR}/downloads
mount -t devtmpfs -o mode=0755,nosuid devtmpfs ${BUILDCHROOT_DIR}/dev
mount -t proc none ${BUILDCHROOT_DIR}/proc
- fi'
+ fi
+
+ # Refresh /etc/resolv.conf at this chance
+ cp /etc/resolv.conf ${BUILDCHROOT_DIR}/etc
+ '
}
diff --git a/meta/classes/isar-bootstrap-helper.bbclass b/meta/classes/isar-bootstrap-helper.bbclass
index 1ac39db..99c1fb7 100644
--- a/meta/classes/isar-bootstrap-helper.bbclass
+++ b/meta/classes/isar-bootstrap-helper.bbclass
@@ -106,6 +106,9 @@ setup_root_file_system() {
sudo mount -t devtmpfs -o mode=0755,nosuid devtmpfs $ROOTFSDIR/dev
sudo mount -t proc none $ROOTFSDIR/proc
+ # Refresh /etc/resolv.conf
+ sudo cp /etc/resolv.conf ${ROOTFSDIR}/etc
+
# Install packages:
E="${@ bb.utils.export_proxies(d)}"
export DEBIAN_FRONTEND=noninteractive
--
2.16.4
next reply other threads:[~2018-11-10 17:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-10 17:35 Jan Kiszka [this message]
2018-11-12 9:07 ` Henning Schild
2018-11-12 9:15 ` [PATCH v2] " Jan Kiszka
2018-11-14 3:18 ` Maxim Yu. Osipov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8937d771-52f0-750c-61f3-25963d8e6a94@web.de \
--to=jan.kiszka@web.de \
--cc=isar-users@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox