From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6750187537661165568 X-Received: by 2002:a05:6830:134d:: with SMTP id r13mr17806219otq.218.1571650511422; Mon, 21 Oct 2019 02:35:11 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:aca:cc88:: with SMTP id c130ls2057706oig.4.gmail; Mon, 21 Oct 2019 02:35:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqy7/9hA9QnkUfhmv6+JJc0ooaIKM5yiESjRKYD7ioBadSX5nH2b4UJmxeVNCGO4i6bwv5ei X-Received: by 2002:aca:df84:: with SMTP id w126mr18736082oig.79.1571650511050; Mon, 21 Oct 2019 02:35:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571650511; cv=none; d=google.com; s=arc-20160816; b=ePf1juZuGXH4xvHVtByiLnY921J/S0CNe/340i3ugIEYP4Nls2Np6tWrvX9YLQWOJD 3d4nhFXOOk4zi754TT5/1WmTteox2NHM/wWtztq2nWfDsFIdamgrysNz5I5fmIFf9DPH NqhC3obycKewxhXpi1DwKZPlaj868Rgp/x78xX3jA1o7EO0JlpNR0nHqehfj1gxs3C+r p9NbrzReq5d0mYABMM9tuxycJxTlHyOv7UZ+980z8h2SMTUuogz9wq11wyExvS6O0L9Z WteEF0yefyH3eDpjK7yVD2BiGNl2JGsY+Qwnt6jKFNh+uJitHqi6pzz8KdEMQw8wE5X2 yLKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:ironport-sdr:ironport-sdr; bh=srlz/bZjTneg5nCBv2U/P0JOKMI/WdyfK0TM4fm044k=; b=OB+i7Bv8cMOsm6tWsiOYMhuBPxMyjCBBfvgPPBEedCLoNV8xM4Q4Mp083c1YbtUz0f Q4hdxWOVpEQI/MEFDdwnXBkR7z+imoNQDUa1N11hsipdv0HF9uiJWrPZYBIq9V37M7K2 yqa4hr1Ac6ozjZbUFQL/y1CaU2vfil1Heua1gV6ehK0rqm77OqO9ZVjYTxqsIlpQm6mp bCZQN/o8tt48UYSZmrBaoILX7jrCgiEg1SZ5pUxFCVvHGqPxA+dprXlZxbhCP7mIfXIx IXB4uEyrtn7siCS1wvFwY1v5fx4GG0o8tIOXq1ym4JXjSXPHxopWvykLG/H5YgQM8+uu K5mQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of cedric_hombourger@mentor.com designates 68.232.137.180 as permitted sender) smtp.mailfrom=Cedric_Hombourger@mentor.com Return-Path: Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com. [68.232.137.180]) by gmr-mx.google.com with ESMTPS id b11si964359oii.5.2019.10.21.02.35.10 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 21 Oct 2019 02:35:11 -0700 (PDT) Received-SPF: pass (google.com: domain of cedric_hombourger@mentor.com designates 68.232.137.180 as permitted sender) client-ip=68.232.137.180; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of cedric_hombourger@mentor.com designates 68.232.137.180 as permitted sender) smtp.mailfrom=Cedric_Hombourger@mentor.com IronPort-SDR: cKY26Eb8zhg3bfZdDNWmMJT+Olzkkv5/T2goYVlPAfZ//bCr5K6rL5BrkluBHqSCHrdPFOEtK4 klXaRax2t+UZZGBmkkI0s07064H7XaTleagtlF7TNAQdFs6xa/d8C1QlvvWCpHhn0BY7VzacsO MXa1ytLtIzirzj1q3Tr0s0ELanrNXZiOag2xfpfXS1hYdHAVORJjw41KPDxdS49d7essF1TROc J3SgwVX1ipfrTRvtWOBLIVaidTn/4H333jwCKhyqKqvymq4xlsvPdGHD11gb4YFs/vt1C+sPyt I6c= X-IronPort-AV: E=Sophos;i="5.67,323,1566892800"; d="scan'208";a="42429278" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa3.mentor.iphmx.com with ESMTP; 21 Oct 2019 01:35:10 -0800 IronPort-SDR: MgwUSOAOxB8LnOHjaG2ELH5tDpNGfxLkAHefvAlwmcgPGxjDFt3slvB/7KpsMXxK4eeV8uCD6R yoSs2d8h2+sGUzLRZ4KbUnTM0CWGnDYc1KGYvKGkZMbQfKM7RUCd5WFGuBhoQyCNrA6zD9qXnP Lo+6BZYItKlhoV2krrj4kwrzQndUz2HFkCAjpeBCy30Yh2IpShgQKwO/QUUF5LZrtJfIO4i5ZQ EbY/yo1ZUW06l2pGqVdJueR4DN41ZOSYDHNM4ev5VL2nWB1u7PAXS03tzBX9qd0ZAiIQGhg0MF zNI= From: Cedric Hombourger To: CC: Cedric Hombourger Subject: [PATCH 1/4] wic-img: do not leave temporary files behind Date: Mon, 21 Oct 2019 11:34:51 +0200 Message-ID: <1571650494-572-2-git-send-email-Cedric_Hombourger@mentor.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1571650494-572-1-git-send-email-Cedric_Hombourger@mentor.com> References: <1571650494-572-1-git-send-email-Cedric_Hombourger@mentor.com> MIME-Version: 1.0 Content-Type: text/plain Return-Path: Cedric_Hombourger@mentor.com X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To svr-ies-mbx-02.mgc.mentorg.com (139.181.222.2) X-TUID: FJYzubdOnQEU We do not seem to make any use of the timestamped wic images being generated and worse we are leaving them in the buildchroot tmp folder. "mv" the generated files instead of "cp"'ing them to the deploy directory. Signed-off-by: Cedric Hombourger --- meta/classes/wic-img.bbclass | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/meta/classes/wic-img.bbclass b/meta/classes/wic-img.bbclass index 795640f..24c3b65 100644 --- a/meta/classes/wic-img.bbclass +++ b/meta/classes/wic-img.bbclass @@ -155,8 +155,12 @@ EOSUDO -e ${IMAGE_BASENAME} ${WIC_CREATE_EXTRA_ARGS} sudo chown -R $(stat -c "%U" ${ISARROOT}) ${ISARROOT}/meta ${ISARROOT}/meta-isar ${ISARROOT}/scripts || true WIC_DIRECT=$(ls -t -1 ${BUILDCHROOT_DIR}/$WICTMP/${IMAGE_FULLNAME}.wic/*.direct | head -1) - cp -f ${WIC_DIRECT} ${WIC_IMAGE_FILE} - cp -f ${WIC_DIRECT}.bmap ${WIC_IMAGE_FILE}.bmap + sudo chown $(stat -c "%U:%G" ${ISARROOT}) ${WIC_DIRECT} ${WIC_DIRECT}.bmap + sudo mv -f ${WIC_DIRECT} ${WIC_IMAGE_FILE} + sudo mv -f ${WIC_DIRECT}.bmap ${WIC_IMAGE_FILE}.bmap + sudo rmdir --ignore-fail-on-non-empty \ + ${BUILDCHROOT_DIR}/${WICTMP}/${IMAGE_FULLNAME}.wic \ + ${BUILDCHROOT_DIR}/${WICTMP} } do_wic_image[file-checksums] += "${WKS_FILE_CHECKSUM}" -- 2.20.1