From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7185246735460990976 X-Received: by 2002:a5e:de03:0:b0:6ee:f9e1:5c5d with SMTP id e3-20020a5ede03000000b006eef9e15c5dmr3776399iok.163.1672945622003; Thu, 05 Jan 2023 11:07:02 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6e02:12b4:b0:304:ca87:c0ba with SMTP id f20-20020a056e0212b400b00304ca87c0bals7747048ilr.2.-pod-prod-gmail; Thu, 05 Jan 2023 11:07:01 -0800 (PST) X-Google-Smtp-Source: AMrXdXtKFg+cgM1qzb2BLmFyJXern17Xl50UTA7QfcxPu/9Gl2pZ6VVQlupQSJWE02tG9Cmvax0J X-Received: by 2002:a05:6e02:1d0a:b0:304:ba64:f094 with SMTP id i10-20020a056e021d0a00b00304ba64f094mr45074201ila.6.1672945621555; Thu, 05 Jan 2023 11:07:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672945621; cv=none; d=google.com; s=arc-20160816; b=qdr3Y9hGzDtoLnCzbiY4Ov6tHnlvTwiRh+lYElAXWNXMdI15tN9pv52DX8dXW+mQHc vzL7aCwDV4v3hwuz/Sccyrc62yFtrms+sA/8NN/HRbNpN0SeaNnTF3CgBC88WjH3uH0j lb0XekKr6J4stt3psLY3Mf6dAq7TxVvtnfWHlC0zeQoMdvnzLCSFLfU5vDk7tubAwpmH e54qHsuAOMlQoysHAnjYTQj0TiFdcJYIzRQte9r95gnQjjNi2OVJg+qYT2GsYOkvTKX6 3tXAQIgoO/6+AQeExpCXhoCgxHy1kdvHOjsD0hURmFL+wOKfyYBYDciMnI4lwGcsgInp UFqg== 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; bh=0X3M9F/K/nIl6+koXhVHyortaALeKwi/vnB6sHuWzlE=; b=c69H4RIssxofZeBJNITXapU2YX224Li6UK5LHL0CRGzcuQmIksNMJ7zaoAa/KVN/dA trMMimGbvOgUX5+UpvHmrYxFJbcUWQLTK4tA6h2soI2W/8sFfM2SR8mLftquiXKqrY32 rzvplxx5vX29N8/XVj7NUF5f7IWtAIMfW7gAIPQisE8f/uYWeRGSFLtA5+gFDWxmTyTr r9yfsMFpw1IO8ubv5kRL6ek6Bl7/7BG44qxvNEniLNfwNSFR+cO8G7A6Ry85vZl6t8RD 6v22OcCwfBztwztwSPY1cRilL5dmOsghApbCuaM8t3SF/1bWEuuzwpxNsKwBr7oBpq9P pocQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=softfail (google.com: domain of transitioning roberto.foglietta@gmail.com does not designate 2001:4b7a:2000:18::169 as permitted sender) smtp.mailfrom=roberto.foglietta@gmail.com; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from relay08.th.seeweb.it (relay08.th.seeweb.it. [2001:4b7a:2000:18::169]) by gmr-mx.google.com with ESMTPS id x1-20020a92b001000000b00302df8abfa9si2331978ilh.1.2023.01.05.11.07.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Jan 2023 11:07:01 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning roberto.foglietta@gmail.com does not designate 2001:4b7a:2000:18::169 as permitted sender) client-ip=2001:4b7a:2000:18::169; Authentication-Results: gmr-mx.google.com; spf=softfail (google.com: domain of transitioning roberto.foglietta@gmail.com does not designate 2001:4b7a:2000:18::169 as permitted sender) smtp.mailfrom=roberto.foglietta@gmail.com; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from localhost.localdomain (unknown [IPv6:2a02:8071:3187:7b80:4cac:985f:1a32:e06e]) by m-r2.th.seeweb.it (Postfix) with ESMTPA id 01A4D3F1EB; Thu, 5 Jan 2023 20:06:59 +0100 (CET) From: roberto.foglietta@gmail.com To: isar-users@googlegroups.com Cc: roberto.foglietta@gmail.com Subject: [PATCH] image class bugfix: interuption does not break the rebuild Date: Thu, 5 Jan 2023 20:06:54 +0100 Message-Id: <20230105190654.2760731-1-roberto.foglietta@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TUID: ynn+0sgAH2oG From: "Roberto A. Foglietta" image class bugfix: interuption does not break the rebuild Signed-off-by: Roberto A. Foglietta --- meta/classes/image.bbclass | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass index d72b8fa..b04826b 100644 --- a/meta/classes/image.bbclass +++ b/meta/classes/image.bbclass @@ -428,10 +428,11 @@ do_rootfs_finalize() { rm -f "${ROOTFSDIR}/etc/apt/sources.list.d/base-apt.list" rm -f "${ROOTFSDIR}/etc/apt/apt.conf.d/50isar" - mv "${ROOTFSDIR}/etc/apt/sources-list" \ - "${ROOTFSDIR}/etc/apt/sources.list.d/bootstrap.list" - - rm -f "${ROOTFSDIR}/etc/apt/sources-list" + if [ -e "${ROOTFSDIR}/etc/apt/sources-list" ]; then + mv "${ROOTFSDIR}/etc/apt/sources-list" \ + "${ROOTFSDIR}/etc/apt/sources.list.d/bootstrap.list" || : + rm "${ROOTFSDIR}/etc/apt/sources-list" -f + fi BTROOTFS="${TMPDIR}/work/${DISTRO}-${DISTRO_ARCH}/buildchroot-target" for i in $(ls -1d ${BTROOTFS}/*/rootfs/ 2>/dev/null || true); do -- 2.34.1