From patchwork Tue Dec 6 23:06:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Roberto A. Foglietta" X-Patchwork-Id: 2275 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Wed, 07 Dec 2022 09:36:35 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-ot1-f59.google.com (mail-ot1-f59.google.com [209.85.210.59]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 2B78aYDZ005059 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 7 Dec 2022 09:36:35 +0100 Received: by mail-ot1-f59.google.com with SMTP id f39-20020a9d03aa000000b006705c6992dasf1989071otf.14; Wed, 07 Dec 2022 00:36:35 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1670402189; cv=pass; d=google.com; s=arc-20160816; b=g+vZKM2Ko8z8GbJm0NlywBxxi3yfS06ltjXy3IVrYNwLGpkonxL3fQXs791OyK2P8Q kyblOF7AHgskNIp7q4VzcpNu6Ldxjfnz00czVt4QzC2fLcVNFTSax6GdiCiLGDDINl30 RkkTghQRH3nt2PzehGCO0rrQqFGilDMAMYpj0dY3ZX1P74yfFZ3hD95cxkF4opHgdBpN T6HMdxjxOQykDKaakSPmJFKLMydiJzzEciBL2WJCgCsVqOHAgvg+mYOAIfqCT0wXaovA w58CZWjzClk0Rtd6rM4sE4EugEWHS0upVbOsv+6aRW68rYZl8dQeUp1Hnk703yz62Za/ 4LTw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-subscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:content-transfer-encoding:mime-version :list-unsubscribe:cc:to:reply-to:message-id:subject:date:from:sender :dkim-signature; bh=MTg2lcWrIcDVU4oMS0p4uQlRX7OFTbQk22cN1rDv1zY=; b=0YPvzoXIHDXNHsyOBBa5TR/dbPYCBs6e7bopyHK2uHmZkGDjVd54KYc/o1H2c5S65b E1u4cRDU+GExgHUagpNoURaGPeUEBuTbgGElpPSXvr4E7sk9+axl0Meoa2/wGLfWm0LB TPToercuykjlbIEne9A5p7tDnjWHfS5Xk0z66vj67xsNSzfk2VRpMuMoCG14uaU1k5Gi uXXLMJmSqBTOwGtr35vYtxGiZggP2HSYrE6WZleD4GhrqrlLZvcQSrc+BGYWMckJqVJz yqR7qMnmukEhFntAjNMt3+6xENs6xCW3l+hluJGhbnqn2Lt14IyUA2y/kofI1qreeX0m iK+A== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of bounces+6ovt5douml8uqwj9z3m4rw2@bounces.elasticemail.net designates 216.169.99.3 as permitted sender) smtp.mailfrom=bounces+6oVt5dOuml8uqWJ9Z3m4rw2@bounces.elasticemail.net; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=list-subscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:content-transfer-encoding:mime-version :list-unsubscribe:cc:to:reply-to:message-id:subject:date:from:sender :from:to:cc:subject:date:message-id:reply-to; bh=MTg2lcWrIcDVU4oMS0p4uQlRX7OFTbQk22cN1rDv1zY=; b=l9CfKR+zP0GdIp8FbSlpQEpdr7yLlG/2Y/r/fZlxNuGO2W+i5r6JYDJzbc1L6/lcw3 CWvB0UhBIh1wUStaPl/bmp0WOBGRLoOD45lbaKJwX+nAFd99fGSs+V5HBPxBd3VwhJ0v am2kIYwoVi6xRxW9gU3zVCY4jwV69iZmX4gax6fCgfwCBPxEjhCcj7T+CRQxH4FVjt33 f0UtXiJbtyjJXRrGJdfh5hK1TAlrksgDNtq5g3Cf+NDJV1fZm5GQbhgH/Tn/XN6KWd1Z D9SzE4Sk8xJ7rnMVu3apUwUXGSbprERZLczZnzHO6Jm5NR5SBBAO3/1oI4gfc8s3QWO2 o8Rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=list-subscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:content-transfer-encoding:mime-version :list-unsubscribe:cc:to:reply-to:message-id:subject:date:from :x-gm-message-state:sender:from:to:cc:subject:date:message-id :reply-to; bh=MTg2lcWrIcDVU4oMS0p4uQlRX7OFTbQk22cN1rDv1zY=; b=j0RTd2mWEDiYA79C+7XWDd/A4xJuxYmfJ58+DHQBcJafxjmUgLlbJ1qmb2T/HZa31x Ovfpg36LaeNqY0xC4d2/gD4nbHI8A4yGCgIeStcXC3BwLnl4TZVOF6Bh3OgCatoJ0YTM tFbH4Pxts8Gw5v6iPq8CZnxF6Gkg1V0ew5Km9ahqqgyrXwma9Ci+Jznnhe4Q3TlFSRHX xAcPpuSO/Z8sUddxxviMVvmnohFL/tpC85v5F0QYfTz9Hnp8JGM1ZYilY94seIXbhALL 1aIa4IbuaEpt9Kg+53JKPR5oNtzGobP9cRKAFUIddqtqmYPNk7NaIkkHBp7m2JRTc0Xr Z+ww== Sender: isar-users@googlegroups.com X-Gm-Message-State: ANoB5pnap3EYi98tgSyJFa7Lf6grPxDeg5MYWGztGbpTDcvqYhVHLEDS 3YgSYZFIB64lLmulltIXq9U= X-Google-Smtp-Source: AA0mqf7GiPDpOfrdud9xNFMiH8RUiPewbsh7TxHj3Hp6hPlsmrdsO5Jn1UxX5aPUlB6GNuhf6Ynfng== X-Received: by 2002:aca:44d5:0:b0:35a:7394:713f with SMTP id r204-20020aca44d5000000b0035a7394713fmr44787039oia.142.1670402188834; Wed, 07 Dec 2022 00:36:28 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6870:73c3:b0:13d:21ad:3b97 with SMTP id a3-20020a05687073c300b0013d21ad3b97ls620918oan.4.-pod-prod-gmail; Wed, 07 Dec 2022 00:36:28 -0800 (PST) X-Received: by 2002:a05:6870:1b0d:b0:144:16b7:cad9 with SMTP id hl13-20020a0568701b0d00b0014416b7cad9mr16648070oab.76.1670402188614; Wed, 07 Dec 2022 00:36:28 -0800 (PST) Received: by 2002:aca:ef88:0:b0:350:c1f3:d913 with SMTP id 5614622812f47-35e2fe2808emsb6e; Tue, 6 Dec 2022 15:06:46 -0800 (PST) X-Received: by 2002:a05:6808:5cb:b0:35b:f272:63c with SMTP id d11-20020a05680805cb00b0035bf272063cmr9544896oij.256.1670368005726; Tue, 06 Dec 2022 15:06:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670368005; cv=none; d=google.com; s=arc-20160816; b=V24tlRpEC/3t3LkNa8BVG2rHceOPJXczJoM0qIdpICIbwrjklGR4pb/8W3En5B/4Xp rsYfnHuJ0uJ8NfGfkgFX/n/notS81uN2ghs0OteKTufbhV2QK2J+QHguaxE+8xDCJkNY lsxwSmxfjktFxOUHhCDITCVCFy1/IpUN4dtildDKseyDUrS6rsuNoh5NhsJTDNCWQMm8 d7djL/EkDYWJG33Dy3kgs+DqDnhgnwXH1x/YNGOKntaPiaMR/9CScxPxynufiav5p8/O lAxk04svRV2D/kzrLvgTdrSJO3JrvZltDlMKgXbEd2Io2U5Iz05Z3AW4CRlIOwULiSus +hGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe:cc:to :reply-to:message-id:subject:date:from; bh=tmpNgE/cfqwh6zMtjoL6hiCDvh5zG39oyxIRX3XXJ9o=; b=JngyNn+kj9P8MQo33/cPFwG/7RSYFiG7rsDW5fJ4+uXwgg1sUjFLqiv0Au3Un7gO40 2sfvHxDWnn4RM8tPKR06akm9vVjtj2Xv+vvbbb0PQw+jAeDOCROrVArVqkE1a14vOI3u MyjavZwYeb58b+EZLzGpf+Jr4HLWxIF3tM7kanyVhBFmGu2Cspc1pEfrmWRxe2iBlPHd L/xU4tqO/7nd/fOkfdqE51DXiDNXdm7U+ydDjHHyNjtzUHU2kDN4Zm3+1lx4mNpKUSHP 0aldIHbhmR/v/GodFJY1e9MpdA8iFBZofoq/FdBgg4Uu42wQYQpxDHxr4M7L60ES6dii S6kw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of bounces+6ovt5douml8uqwj9z3m4rw2@bounces.elasticemail.net designates 216.169.99.3 as permitted sender) smtp.mailfrom=bounces+6oVt5dOuml8uqWJ9Z3m4rw2@bounces.elasticemail.net; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from pn3.mxout.mta2.net (pn3.mxout.mta2.net. [216.169.99.3]) by gmr-mx.google.com with ESMTPS id v199-20020acaacd0000000b0035c4c510304si383042oie.1.2022.12.06.15.06.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Dec 2022 15:06:45 -0800 (PST) Received-SPF: pass (google.com: domain of bounces+6ovt5douml8uqwj9z3m4rw2@bounces.elasticemail.net designates 216.169.99.3 as permitted sender) client-ip=216.169.99.3; From: roberto.foglietta@gmail.com Date: Tue, 06 Dec 2022 23:06:43 +0000 Subject: [PATCH] Rebuild after cleaning does not work anymore, bugfix Message-Id: <4uil9nq8jkub.6oVt5dOuml8uqWJ9Z3m4rw2@16F0H.trk.elasticemail.com> Reply-To: roberto.foglietta@gmail.com To: isar-users@googlegroups.com Cc: roberto.foglietta@gmail.com List-Unsubscribe: , X-Msg-EID: 6oVt5dOuml8uqWJ9Z3m4rw2 MIME-Version: 1.0 X-Original-Sender: roberto.foglietta@gmail.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of bounces+6ovt5douml8uqwj9z3m4rw2@bounces.elasticemail.net designates 216.169.99.3 as permitted sender) smtp.mailfrom=bounces+6oVt5dOuml8uqWJ9Z3m4rw2@bounces.elasticemail.net; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= From: "Roberto A. Foglietta" bugfix, image and roofs classes, fails in rebuilding - rebuild after cleaning does not work anymore but it is required to remove manually all the directories and this would take longer to rebuild. This patch fixes this new worng behaviour which happens when the kernel is not compile but installed. Reproducibility: this sequence of commands does not work anymore kcbuild ./kas-container --isar clean      XOR/AND sudo ./kas-container clean kcbuild It fails with error while the following still works kcbuild sudo rm -rf build/tmp build/sstate-cache kcbuild but it takes more time than the previous when it was working. Signed-off-by: Roberto A. Foglietta --- meta/classes/image.bbclass | 9 +++++---- meta/classes/rootfs.bbclass | 3 +++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass index 813e1f3..d5c173b 100644 --- a/meta/classes/image.bbclass +++ b/meta/classes/image.bbclass @@ -346,17 +346,18 @@ DTB_IMG = "${PP_DEPLOY}/${@(d.getVar('DTB_FILES').split() or [''])[0]}" do_copy_boot_files[dirs] = "${DEPLOY_DIR_IMAGE}" do_copy_boot_files[lockfiles] += "${DEPLOY_DIR_IMAGE}/isar.lock" do_copy_boot_files() { - kernel="$(realpath -q '${IMAGE_ROOTFS}'/vmlinu[xz])" + set -x + kernel="$(realpath -q '${IMAGE_ROOTFS}'/vmlinu[xz] || true)" if [ ! -f "$kernel" ]; then - kernel="$(realpath -q '${IMAGE_ROOTFS}'/boot/vmlinu[xz])" + kernel="$(realpath -q '${IMAGE_ROOTFS}'/boot/vmlinu[xz] || true)" fi if [ -f "$kernel" ]; then sudo cat "$kernel" > "${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE}" fi - initrd="$(realpath -q '${IMAGE_ROOTFS}/initrd.img')" + initrd="$(realpath -q '${IMAGE_ROOTFS}/initrd.img' || true)" if [ ! -f "$initrd" ]; then - initrd="$(realpath -q '${IMAGE_ROOTFS}/boot/initrd.img')" + initrd="$(realpath -q '${IMAGE_ROOTFS}/boot/initrd.img' || true)" fi if [ -f "$initrd" ]; then cp -f "$initrd" '${DEPLOY_DIR_IMAGE}/${INITRD_IMAGE}' diff --git a/meta/classes/rootfs.bbclass b/meta/classes/rootfs.bbclass index d19ac03..0d16754 100644 --- a/meta/classes/rootfs.bbclass +++ b/meta/classes/rootfs.bbclass @@ -33,6 +33,9 @@ rootfs_do_mounts[weight] = "3" rootfs_do_mounts() { sudo -s <<'EOSUDO' set -e + for i in dev/shm dev/pts proc sys; do + mkdir -p '${ROOTFSDIR}/$i' + done mountpoint -q '${ROOTFSDIR}/dev' || \ ( mount -o bind,private /dev '${ROOTFSDIR}/dev' && mount -t tmpfs none '${ROOTFSDIR}/dev/shm' &&