From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6750187537661165568 X-Received: by 2002:a2e:7d17:: with SMTP id y23mr6104816ljc.228.1573205026615; Fri, 08 Nov 2019 01:23:46 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a19:760e:: with SMTP id c14ls1582811lff.13.gmail; Fri, 08 Nov 2019 01:23:45 -0800 (PST) X-Google-Smtp-Source: APXvYqzVntpcEUtmNw2FG8dax26xZ+Y3tqFf1c3Pl11B6kFKnAQZ3lmhhLi0EZ9iYVFKPTIVC1J8 X-Received: by 2002:ac2:46e5:: with SMTP id q5mr6089705lfo.148.1573205025936; Fri, 08 Nov 2019 01:23:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573205025; cv=none; d=google.com; s=arc-20160816; b=e+ixUI33NHi1PsYD38ZtwMWWxYO9wamSESgfG2IZ+FIIuvvB61IdoFtLNOb/XAYiOV utYZZsZB5Ji3SHtrWd8N1/70qW4zBc9G7J6iGnDoj85vUVihtB1yuATqSA2oIRrZ1V6O /g+z3PMctBGh+y6HUCCZBebKr2hAnGYm/klhwLIz/udsHd6tS6JwCMlI1Gsl7k+VX42V tZ56k75Ou16KvCqewL8XXf/eOrqAfXvwX6dKc+tM3IOa63DyoRw9u2UJbMFh834r0ygX +to6F529mdHc/Tbjk0oyHEq5Fbp6C6f89Y7rVPucAgyDehmCRroDmlfW2RlEiD7nD1HK 4bQQ== 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=HaaC6LcYScsKmJJCsUwXOlqnpqyc3i3dN3UKDRUxvSxux8L0q1lNYip7fifBn/JayJ X7Dey4uHck9qpsPaLL41gniUfsKtU1ANHMvTODy+z4lJZDiHgCAeZqMlXckS+ZZIV/s1 4jFowYDe+c0GheKN6gdBnY+WQukL41+pMZygnmM9g5AmFthEzUi30Y1i1sxOFEq9TtCx aDyfCECVORJoknDVc4TucOc9YYwYZJNFEpuVRNpFNLsu2fLwpQ/4cJrmDzAcBPPOqURL Rv4cYzWlar9IsKdjySa3we/iRT758MorBMBIvWIF59pKRigxuWFOMVe/hvN/fYTZBBWE bHpg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of cedric_hombourger@mentor.com designates 68.232.137.252 as permitted sender) smtp.mailfrom=Cedric_Hombourger@mentor.com Return-Path: Received: from esa4.mentor.iphmx.com (esa4.mentor.iphmx.com. [68.232.137.252]) by gmr-mx.google.com with ESMTPS id s4si603172ljg.1.2019.11.08.01.23.45 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 08 Nov 2019 01:23:45 -0800 (PST) Received-SPF: pass (google.com: domain of cedric_hombourger@mentor.com designates 68.232.137.252 as permitted sender) client-ip=68.232.137.252; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of cedric_hombourger@mentor.com designates 68.232.137.252 as permitted sender) smtp.mailfrom=Cedric_Hombourger@mentor.com IronPort-SDR: VaHQ08/4BO/zQqa6DdxElPlO3xOh4yI8dfUa/gHxLKUpQQ/cQwFZyTElw8EYf1pH26eWwg/i7X RO+3TRGpaszWkxJUIqhJSCIOUntctGqKxfncLo6NmSr+ko4G+Oh4PBJb4vsV2ZHNRZkfHzBNsY tC7k+gdOoGRYC5YODHIMZvbGXNHa9h+kFsLskx/eo6AndKKdGRZgGP3YTX23dz4FSjY6x4HDDg 3tyIJbnRdmUcNlEwUYMOONk9bGz7qVd09hRl8yISrqpZhjnFWJ6uvHO83Goxt69hefqa4BRZ7K Ohc= X-IronPort-AV: E=Sophos;i="5.68,280,1569312000"; d="scan'208";a="43031253" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa4.mentor.iphmx.com with ESMTP; 08 Nov 2019 01:23:43 -0800 IronPort-SDR: 14hQ5DsKkR25MdRYcY4H/EGxzgTFrbXuLgTPbmlVp8NUJKT1hH0ZC1xDV4SgC5i21L3kbXI83V VGPtqs1ZWxMmYvUw4dXfrDJ24Il2BDNRDam7b+UjL4Pf4vE8ahHAlDhSHpDAlVqbBf6BSV1tpt D7g8aX5aCAZIfPAlA5sKqt4rP11n695i+N6gjd5g39OI5z8oDR1NGF8Z0+g/DqG72TmdYF+hBy Q3MTttb3vJn3ARbwCBUk4SbWVfpW1C+3/OmktFFjVcA8SuNmm1y5KYBGfPFRo4hYZrZRa2lUri Nqo= From: Cedric Hombourger To: CC: Cedric Hombourger Subject: [PATCH v4 - misc fixes 1/6] wic-img: do not leave temporary files behind Date: Fri, 8 Nov 2019 10:23:18 +0100 Message-ID: <1573205003-1335-2-git-send-email-Cedric_Hombourger@mentor.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1573205003-1335-1-git-send-email-Cedric_Hombourger@mentor.com> References: <1572958385-246-1-git-send-email-Cedric_Hombourger@mentor.com> <1573205003-1335-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-07.mgc.mentorg.com (139.181.222.7) To svr-ies-mbx-02.mgc.mentorg.com (139.181.222.2) X-TUID: mug7LtvYo2AV 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