From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6750187537661165568 X-Received: by 2002:ab0:5973:: with SMTP id o48mr14819505uad.105.1572958417611; Tue, 05 Nov 2019 04:53:37 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a67:d40e:: with SMTP id c14ls1489279vsj.1.gmail; Tue, 05 Nov 2019 04:53:37 -0800 (PST) X-Google-Smtp-Source: APXvYqw9yAkyPPuLNLStiLKu20QO/38ipgteXJN/YHMb1DNiT8g6H/U/j/wj1yIEZRR3jNRjEIMX X-Received: by 2002:a67:381:: with SMTP id 123mr2753852vsd.93.1572958417251; Tue, 05 Nov 2019 04:53:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572958417; cv=none; d=google.com; s=arc-20160816; b=MakSDb+cSmFvtLr5afX6RGJaFY97mGj9NES4SYQMSWLKpzIq7cXHkzT4xk6d531LLD JpCituYTF5NBVFHunWAT+49DLDyuc4vPUH8e9Yk2w3/Siow2aLjPkJECGIFxz4sPxbPu iN5KnEE6CRdBT0eNTzfx2NJZNzsfxr/1nqFNswrWCmPrCagwKIV0/MgH5oC2Qg8N4dHK TKGwtCntc3ppSwBofWIzHxie3yZa2STR+Mh3kl15CLGWVIrgXAmU0yNgmwP1ue17GBwI hdKPKGkadwLLBDjX//9unMjQp7Q1HP3c8bAegbsXd6uk1jso5VPmc1f/agOPQPld868l vd5A== 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=YDgAchiEd+dwzLjnyB7tIdfk+JK8RpS5NiYB1ts0kYpuXn4moajwiU+iK/G1qcc8OW K+WfISlHSGQPpgnyVKdJKHgPVz6JszZnikN12cMEa3L1jEpimTh1EvrSWwYueqjhXghv PrLguhw6M5oHDL7cfZN1zm7bgdZgQ2lF16kcNvmd9GSpBAM1LnGiYYrloZpaOzGqMNfa Dt6nsil3dmdzPZSlYs+3TtDbSBMw18d1h3YNVQuJLpF4ra1oDqYPEnr9uWkyR1WlyN+0 ih8g+O+/sKt2l/HpOw8QAu8nwx7pzu4rXXRqu+Xiz6+YHyqbmyVcLXGZlyi2dIfKaSL/ nZEQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of cedric_hombourger@mentor.com designates 68.232.129.153 as permitted sender) smtp.mailfrom=Cedric_Hombourger@mentor.com Return-Path: Received: from esa1.mentor.iphmx.com (esa1.mentor.iphmx.com. [68.232.129.153]) by gmr-mx.google.com with ESMTPS id s197si872906vkd.5.2019.11.05.04.53.36 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Nov 2019 04:53:37 -0800 (PST) Received-SPF: pass (google.com: domain of cedric_hombourger@mentor.com designates 68.232.129.153 as permitted sender) client-ip=68.232.129.153; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of cedric_hombourger@mentor.com designates 68.232.129.153 as permitted sender) smtp.mailfrom=Cedric_Hombourger@mentor.com IronPort-SDR: NbopaMcklj5v0/A4jWwZahAm7Pda3bPt29ZCCglgZhw7J6vOvNjUT9QfYwq7gm1xiKierBYZ28 5v8rXFggHyySE20OAXRGRLaKItvWDdfPJusEQyerHlfq//38JmObXHErrMCX7qgwj3q1dCHJZ/ b24chVDs0z16cXwzZW2mawD5Z6f/ldVfJ74LTFggBSkJOggSYyrPkOUPIOHEqcA+zQxyCh16Sa DTDLJ5ZCa8qPV0kAKUf0ksfICGLIgV7jT0owv34FqiTwpp8EhgloKJBo370Cxr1+oF8QjiXolL GJg= X-IronPort-AV: E=Sophos;i="5.68,271,1569312000"; d="scan'208";a="44726279" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa1.mentor.iphmx.com with ESMTP; 05 Nov 2019 04:53:35 -0800 IronPort-SDR: EvcZdgTX1qWyDjEGliaqHf4XVIOvj1YDgFxfOvraj8DR/nFVKiIIjZVVOlk46Ub/DLvVKDyWO9 vP+WGCfqW3lwugu8w5baAUjEOsI31ewZuramzUldfQBV8ib5Wqm3xodPXZGdR2ekOqpKdkXoue 12bGyLzHYnBWeJqLY7qWh/1UkiXCiBQf0EfhXbQYWDMCRSLgjAEJEkd9qkh3XG2QeCfjFb/5J1 5KI/WIv54p8SdZeXXZZ1EC/eJ9ZzzBLugaa+UksDRLe1ZX2q3jnRjnYEgvJ83K7id1QRyXzTPi PF0= From: Cedric Hombourger To: CC: Cedric Hombourger Subject: [PATCH v3 1/6] wic-img: do not leave temporary files behind Date: Tue, 5 Nov 2019 13:53:00 +0100 Message-ID: <1572958385-246-2-git-send-email-Cedric_Hombourger@mentor.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1572958385-246-1-git-send-email-Cedric_Hombourger@mentor.com> References: <205b23d6-c598-eb03-f38d-0693bc4344a6@mentor.com> <1572958385-246-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-09.mgc.mentorg.com (139.181.222.9) To svr-ies-mbx-02.mgc.mentorg.com (139.181.222.2) X-TUID: W6YkIz9Yj/+U 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