From: Jan Kiszka <jan.kiszka@siemens.com>
To: isar-users <isar-users@googlegroups.com>
Cc: "[ext] Henning Schild" <henning.schild@siemens.com>
Subject: [PATCH v2] Refresh /etc/resolv.conf on partial rebuilds
Date: Mon, 12 Nov 2018 10:15:06 +0100 [thread overview]
Message-ID: <c17d3bea-f65c-e2be-a76f-25163796d714@siemens.com> (raw)
In-Reply-To: <20181112100710.39e92ac9@md1za8fc.ad001.siemens.net>
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>
---
Changes in v2:
- use "cp -L"
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..34b7f59 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 -L /etc/resolv.conf ${BUILDCHROOT_DIR}/etc
+ '
}
diff --git a/meta/classes/isar-bootstrap-helper.bbclass b/meta/classes/isar-bootstrap-helper.bbclass
index 1ac39db..e6a46ce 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 -L /etc/resolv.conf ${ROOTFSDIR}/etc
+
# Install packages:
E="${@ bb.utils.export_proxies(d)}"
export DEBIAN_FRONTEND=noninteractive
--
2.16.4
next prev parent reply other threads:[~2018-11-12 9:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-10 17:35 [PATCH] " Jan Kiszka
2018-11-12 9:07 ` Henning Schild
2018-11-12 9:15 ` Jan Kiszka [this message]
2018-11-14 3:18 ` [PATCH v2] " 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=c17d3bea-f65c-e2be-a76f-25163796d714@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=henning.schild@siemens.com \
--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