From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7304967695777136640 X-Received: by 2002:a05:6870:b4a9:b0:1f5:c858:2efe with SMTP id y41-20020a056870b4a900b001f5c8582efemr2381190oap.0.1700820330903; Fri, 24 Nov 2023 02:05:30 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:ac8:4686:0:b0:423:9e2b:f650 with SMTP id g6-20020ac84686000000b004239e2bf650ls113875qto.1.-pod-prod-03-us; Fri, 24 Nov 2023 02:05:30 -0800 (PST) X-Received: by 2002:a05:622a:514:b0:421:c3a9:1e32 with SMTP id l20-20020a05622a051400b00421c3a91e32mr82347qtx.3.1700820330404; Fri, 24 Nov 2023 02:05:30 -0800 (PST) Received: by 2002:a05:620a:2410:b0:778:a9dc:3cb2 with SMTP id af79cd13be357-77d641b56c2ms85a; Fri, 24 Nov 2023 02:04:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IE+yGbn066AeQpXWNuhnQbD0DHlqb5BupH8q6ZhTo1GFP03eiiqU5vSFIJk/maCrx0XNeD5 X-Received: by 2002:a05:6122:2003:b0:4ac:2c7a:c9af with SMTP id l3-20020a056122200300b004ac2c7ac9afmr2299442vkd.5.1700820257977; Fri, 24 Nov 2023 02:04:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700820257; cv=none; d=google.com; s=arc-20160816; b=gK35CCwB2fxlupDijZF7+b0wLyvKkuDUsRs3hYpygp8wQ1UWdW/C1FDCVT7VM3UdM0 ++c0Ehf0y0s4Dcev+f0WJNHrfKHv1Vd8j7cgmJc6WGe9GO2Rhj9A8ptACzqe3gmfL7MD bn/+pJHoEm/rElGZv+iyKz0V0N/roM886JvdQAAf6Q2xmSkJrFlG7+4dsdNneLLfdl4P fqzT/Pn29LQkhnoaetZIoVo4iN4iZzsLc716JceJmu7WFg2yIOFBXKpdRXPsyhDFN72p C9yy4a2UbW5RzaYL5DiNDTKhqUE7IfuD2/jXNRWncKOP7MXg9hw7iDgP6hpbjunsXrbq J3FA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:ironport-sdr; bh=GBOHDpYuhHfsfMFKGazRJoceFnJDfgWJ63X45NgjlF0=; fh=WCiLD9hemnHh6NUBFW0LjVX+sMPb7ez6MMBZhMMnJL8=; b=K7DiLPi4xl8viYNqIm899zA5+gLoaO6JuL5sOeh85j8npa0wWDjYrMuK52k68dYgCH nmtwnUUZuHGqf9UfhiOzBCY+sYgVgcT+wsRlvjQM5VZKGEBqBYHXzCdArnG5fKR7Rb8D iHFAFZZeqHFb/x9qi8bhjGGG006WRV5JUogHXU+h4+8/JzxROIbCsfrGAehNMJrGbvuE OR/6i+P5TFHWXlNEr08wO3/nunaj02EIqgouU1mV7AZeg12zZrlM60hC++nL3T4iv3dS J+u/29H/Ld6hzr8bx/8Lj7GcHB5SQ7ybJwaqkdPyDmwTAZOhjBXbHgs9HiI+gbiqyQyk /gDA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of shivaschandra_kl@mentor.com designates 68.232.137.252 as permitted sender) smtp.mailfrom=Shivaschandra_KL@mentor.com Return-Path: Received: from esa4.mentor.iphmx.com (esa4.mentor.iphmx.com. [68.232.137.252]) by gmr-mx.google.com with ESMTPS id fi26-20020a0561224d1a00b004abdf59bcfcsi346448vkb.3.2023.11.24.02.04.17 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 24 Nov 2023 02:04:17 -0800 (PST) Received-SPF: pass (google.com: domain of shivaschandra_kl@mentor.com designates 68.232.137.252 as permitted sender) client-ip=68.232.137.252; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of shivaschandra_kl@mentor.com designates 68.232.137.252 as permitted sender) smtp.mailfrom=Shivaschandra_KL@mentor.com X-CSE-ConnectionGUID: 0Ej1+/7cTZSlXSXi7nj14w== X-CSE-MsgGUID: 3ZIGkERpRse2WOSpnIi+2w== X-IronPort-AV: E=Sophos;i="6.04,223,1695715200"; d="scan'208";a="23585667" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa4.mentor.iphmx.com with ESMTP; 24 Nov 2023 02:04:16 -0800 IronPort-SDR: M/CUgKEbXZxjbHTmujE8rzBJqF6pS5/itj4Y3Htp5jx7BmQLsJS+pM7DbgdoNnMSFSk6cfO0h3 44xOx/Vq6hu93id96bAAv60eMFRSir4j/Nv95MY8IqeRAu9uz7XTu+3epSS16PWDIeK2MQRWCw pe22jHgVN4s74Y7ubGnYiSNfiScTt8fw4IBcNxGJln3btPuHfETqZnCKwIDtcueLax++WzHElM oEnOPtXnBJJuLei9uqf4oOJVVq7+Sy9Y3TWP8sCga/xPh8p/ezPtz/sL3VzCoakyHpZIz22Gy/ tDI= From: Shivaschandra KL To: CC: Shivaschandra KL Subject: [PATCH] meta/classes/rootfs.bbclass:systemd-resolved fix build issue Date: Fri, 24 Nov 2023 05:03:53 -0500 Message-ID: <20231124100353.45847-1-Shivaschandra_KL@mentor.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain Return-Path: Shivaschandra_KL@mentor.com X-ClientProxiedBy: svr-orw-mbx-15.mgc.mentorg.com (147.34.90.215) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-TUID: zg4OhXACwALq From: Shivaschandra KL 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 --- 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