From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6750187537661165568 X-Received: by 2002:a25:13c1:: with SMTP id 184mr16788550ybt.20.1571670506793; Mon, 21 Oct 2019 08:08:26 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a25:e805:: with SMTP id k5ls2044419ybd.3.gmail; Mon, 21 Oct 2019 08:08:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqx8XmeAtykcc/4og0Po7kzcCZGDO3wCuCFadoLgEd1snXf8WfpUzPSO3wVV84LPrrHA9UMK X-Received: by 2002:a25:d14c:: with SMTP id i73mr16637626ybg.70.1571670506492; Mon, 21 Oct 2019 08:08:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571670506; cv=none; d=google.com; s=arc-20160816; b=Oxea8wjHNNtTdGh4zDe+Rc9+V4hPiuUVDydVzvz8qjWZRLiAzYuEOyhWqCso4WTwYZ R0kCVsezk+g/oT9D+EPrdLn52SjD05dgLLHOm1sOZJsBOKb81D3PQ/BWaTxi720r5v3P CRy7zPqUrbZ3tnXZJzWQ+IVALNONKW9VmWVvySvvCDcugxY1VYzQUabySw9+ewXN62lJ K3UGzPL8KhqUULVDi6OmET+ICW/I/iY8KBGC5cbYN/17UCZSGLQ0jaBOE7GMiFkYnW4p aMGQ91cDoBDOgbVVLVWIIElCrg8ugH1ajUEOYv6RF+S5d2B7ORSiM2UEDDfXvbKXSzjM R7Ag== 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=Sz0dKCQoFPQHmy9AEUknMyHk4/8s42Utr+SOEQlH31yfHXg/A3V0+FMkMS3KRlYnef f9Kz9RaykYiiVavHyjjgGKo/sAYKUrroJSRA1o1y48HvI0WILr1r2lun9z+Gpf9WFbPo g8xVunVCK6zauhIgznTvVqdUGjSHTvTDgVcuRnuKc6Ummg6RZuWb18UO+kvIRRwNOO37 LLgvOGDqWm6Xl1FEtw1fWzihkfRLPmtVThdsEuuOf6IMU58rMXqjNPoCRTP3g2a+It6q 0OdCVkXefq4xEwF2Bz65p5K0c8sPpd2WlZjApapm8D/XKSzaaoXv5d71XeO0yJfMZjgM m0bw== 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 t73si921797ybi.4.2019.10.21.08.08.26 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 21 Oct 2019 08:08:26 -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: E9hEOkWs1EAfHK7SGYgz8JZ/WYhz7j44sgTUEYUZlnAlZpHYtv9KZ8a9DDerWDS0Vg6+xUtLIy SjecPpYSQvfJLhRFeEtAA/Ij5eiur6L/MZxRLfE3Ob2Q7vvK+De9U4IJFzxabHAvejMbpoq4SX 95o7SA0yrs4mm9NqEFLHCm8bEz9QTadXQXU4LXH+t80/HnFx4sRQ5uQ4kzGHvPNR+96RQ5qkHO 1IN0QV7Gw3l5Yv5Ncan66o7KUKHOcG3D0INpQmhgsAwXE35hb/3WS6YXjE/Unf81DgVbms1DzO tu4= X-IronPort-AV: E=Sophos;i="5.67,323,1566892800"; d="scan'208";a="42440862" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa3.mentor.iphmx.com with ESMTP; 21 Oct 2019 07:08:25 -0800 IronPort-SDR: zV5TNGgNLhvj5t3L09Cu1CL/mVq4zgrjJBa51uV1kIaoEPkilHnOlS4lLjuHEtiqzUuP8+j/AW 6NXGgJx0quspUIk8ulEZJ3Jjj82egzZoBLQ/DWPz707ypshpKl/52aMbMe648y6I2FgcoNYvUe zXHDK+UOSwFyAGR/ANnoKBhVa63wT795nm0Ap+/xD1/j+IoOfTPVsrf2zjSV/QK5S+D6BFD9sk gCH4zAvFvhjpq0r+9yubF+lXiNAOxHDmAm4Wqi+6ZGDtSY8sEkgh8GThica5dJAsYuLYXg2dNA SEg= From: Cedric Hombourger To: CC: Cedric Hombourger Subject: [PATCH v2 1/5] wic-img: do not leave temporary files behind Date: Mon, 21 Oct 2019 17:08:08 +0200 Message-ID: <1571670492-767-2-git-send-email-Cedric_Hombourger@mentor.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1571670492-767-1-git-send-email-Cedric_Hombourger@mentor.com> References: <83f900e7-753a-5728-c7b9-5c2cf2733f2b@mentor.com> <1571670492-767-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: IS1OPkCk9Pu5 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