* [PATCH] meta/classes/rootfs.bbclass:systemd-resolved fix build issue
@ 2023-11-24 10:03 Shivaschandra KL
2023-11-29 9:22 ` Uladzimir Bely
0 siblings, 1 reply; 2+ messages in thread
From: Shivaschandra KL @ 2023-11-24 10:03 UTC (permalink / raw)
To: isar-users; +Cc: Shivaschandra KL
From: Shivaschandra KL <shivaschandra.k-l@siemens.com>
Building images with systemd-resolved package included using IMAGE_PREINSTALL,
fails due to dangling symlink error. This is due to pre-existing symlink
for /etc/resolv.conf, created by installation of systemd-resolved.
So we need to ensure that, we unlink and symlink existing for /etc/resolv.conf.
Signed-off-by: Shivaschandra K L <shivaschandra.k-l@siemens.com>
---
meta/classes/rootfs.bbclass | 3 +++
1 file changed, 3 insertions(+)
diff --git a/meta/classes/rootfs.bbclass b/meta/classes/rootfs.bbclass
index 65574a6c..1b95115a 100644
--- a/meta/classes/rootfs.bbclass
+++ b/meta/classes/rootfs.bbclass
@@ -134,6 +134,9 @@ rootfs_install_resolvconf[weight] = "1"
rootfs_install_resolvconf() {
if [ "${@repr(bb.utils.to_boolean(d.getVar('BB_NO_NETWORK')))}" != "True" ]
then
+ if [ -L "${ROOTFSDIR}/etc/resolv.conf" ]; then
+ sudo unlink "${ROOTFSDIR}/etc/resolv.conf"
+ fi
sudo cp -rL /etc/resolv.conf '${ROOTFSDIR}/etc'
fi
}
--
2.39.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] meta/classes/rootfs.bbclass:systemd-resolved fix build issue
2023-11-24 10:03 [PATCH] meta/classes/rootfs.bbclass:systemd-resolved fix build issue Shivaschandra KL
@ 2023-11-29 9:22 ` Uladzimir Bely
0 siblings, 0 replies; 2+ messages in thread
From: Uladzimir Bely @ 2023-11-29 9:22 UTC (permalink / raw)
To: Shivaschandra KL, isar-users
On Fri, 2023-11-24 at 05:03 -0500, Shivaschandra KL wrote:
> From: Shivaschandra KL <shivaschandra.k-l@siemens.com>
>
> Building images with systemd-resolved package included using
> IMAGE_PREINSTALL,
> fails due to dangling symlink error. This is due to pre-existing
> symlink
> for /etc/resolv.conf, created by installation of systemd-resolved.
> So we need to ensure that, we unlink and symlink existing for
> /etc/resolv.conf.
>
> Signed-off-by: Shivaschandra K L <shivaschandra.k-l@siemens.com>
> ---
> meta/classes/rootfs.bbclass | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/meta/classes/rootfs.bbclass
> b/meta/classes/rootfs.bbclass
> index 65574a6c..1b95115a 100644
> --- a/meta/classes/rootfs.bbclass
> +++ b/meta/classes/rootfs.bbclass
> @@ -134,6 +134,9 @@ rootfs_install_resolvconf[weight] = "1"
> rootfs_install_resolvconf() {
> if [ "${@repr(bb.utils.to_boolean(d.getVar('BB_NO_NETWORK')))}"
> != "True" ]
> then
> + if [ -L "${ROOTFSDIR}/etc/resolv.conf" ]; then
> + sudo unlink "${ROOTFSDIR}/etc/resolv.conf"
> + fi
> sudo cp -rL /etc/resolv.conf '${ROOTFSDIR}/etc'
> fi
> }
> --
> 2.39.2
>
Applied to next, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-11-29 9:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-24 10:03 [PATCH] meta/classes/rootfs.bbclass:systemd-resolved fix build issue Shivaschandra KL
2023-11-29 9:22 ` Uladzimir Bely
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox