From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6750187537661165568 X-Received: by 2002:ac2:5637:: with SMTP id b23mr11928509lff.73.1573837239807; Fri, 15 Nov 2019 09:00:39 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:651c:1119:: with SMTP id d25ls2299076ljo.13.gmail; Fri, 15 Nov 2019 09:00:39 -0800 (PST) X-Google-Smtp-Source: APXvYqxBUnv1PKeFA1oVsPZIYx/5VI6fASYJaF5oM8fIG6vNkwZHqGjrD/An2wMNG57Y94YHH4J3 X-Received: by 2002:a2e:9d97:: with SMTP id c23mr11916019ljj.121.1573837239106; Fri, 15 Nov 2019 09:00:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573837239; cv=none; d=google.com; s=arc-20160816; b=Xj+o2C12H4X2jQCxLfn00Lq/0G0HBiL9eMwYgxHBaW4Q/ZZH2BSXGTSGKZKVBRWyH3 kcDDM80gtS3jmVmCQ29TttFlQGJHqGFD3k9cYtPJ1KXGa66qSK4LpGjWc5pDWXLUj5EG M/BJ3WG1askuk6ngm3LQI+rikMKn7YhqphwTwWD5aSB62zFP7BKFvR1QBdSA0+XVtYCX aBNjYun9zFqwDy9z6op9mAU3dO6ciiiHwgKxjlGnvElSSeTL3A0atM3YkapbTTY3jJ0W f0A5jWL2iJjnGZGYCF2K6SQ9YwzpfGtG+ieiYk5ppJW8dFtXDZvv7AakWkKYOOxLPh06 Sn2A== 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=EUL1oHorYVXolJggd8iiOs2vS3HXYiqxtpjDDklh/xU=; b=fT7Mh8gHi7q+1sADhmhcDgiGZjM0cdu/NJ6Gn33Q6ZFeK/YMJsk8TSGGGt0C0Jg65a efJT1LWDUm1MTYuThK8DrOyk9ApzRk8o2DJtbH8AnX92DVhBs/K5etMGGxFZKcNtmHqG 9Jl6b3yb9yFIb+OBT16RGRZxYTRbG5WOAwF7kmdqpgkCWXcSldj/TCKIZ5JdEMwEnOc9 A9YcktiCBElbj9zfyWpM5kcOGPy8iKeKXdgdoyo+LfRT01izmacEYYT23F+8JpUIXIlD X86seSMNlNdqw611A0AVR8BIqIIiKtkazw8fkgR6Kit++BMvYaKc3vsJUwQr7TPNxYjP NzvA== 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 b13si440242ljk.4.2019.11.15.09.00.38 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Nov 2019 09:00:39 -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: BL/tTbK6zfxJ/beS4Nn/uNiIMRR8QTtMkWJ2b8j2hVNxZ9T44YQmxwaGtBBxbIHqpwqox/3MvA v3VPtIQpVt2q0pAXCR6hNwFKPeV4fKPZRhbZ86f31vZmBn6z71m6e1u68PRO5TnDhBHkMCunWV m/UCdRl1w816CL/g2RTedGZZThHvPHyv7b+BxoWapf6Ec02Y1Xavy8u5GMO4urpZpfS5Kb0r3A pJrlCgE6ciYayLnZc9KUtZfaa+09/AgmlxIW/qw7WIhyv3r26wB92kUrXZ7ETxGvWVOHYXbS// OP0= X-IronPort-AV: E=Sophos;i="5.68,308,1569312000"; d="scan'208";a="43259325" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa4.mentor.iphmx.com with ESMTP; 15 Nov 2019 09:00:36 -0800 IronPort-SDR: Vipap9GDbdkTellCLP4OoIzFjyHRax3keZQ25+QQjbH/FxtWArVBA+fWX4I4lkNhgg0t+C7wCm izB2HXy/LlfInunU0UX4hVVfyLWTCxTRtIEj3ixZxNk0L+yQNZ2mi/q3e9KUYpJFk4YEDx+APl QJli+ziDlaproJLn8g/tPCTA6LBHcEUX8mKvETVr2YZCDGc4oLyfy/4bgoonym0B1CmvuM1eFI E2MuP+yqU0Q/maZnN8ErlnPN+xujrSQKRbcjzgMzjW1s1hDWMBmdBu126vpgY6rkRl6YJ3kovy Z24= From: Cedric Hombourger To: CC: Cedric Hombourger Subject: [PATCH v5 1/6] wic-img: do not leave temporary files behind Date: Fri, 15 Nov 2019 18:00:10 +0100 Message-ID: <1573837215-324-2-git-send-email-Cedric_Hombourger@mentor.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1573837215-324-1-git-send-email-Cedric_Hombourger@mentor.com> References: <26ab6076-157e-7573-919d-dfa7cb273b25@siemens.com> <1573837215-324-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: ekq0XnG8KXb5 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 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/meta/classes/wic-img.bbclass b/meta/classes/wic-img.bbclass index 795640f..7d30e45 100644 --- a/meta/classes/wic-img.bbclass +++ b/meta/classes/wic-img.bbclass @@ -155,8 +155,10 @@ 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 -R $(id -u):$(id -g) ${BUILDCHROOT_DIR}/${WICTMP} + mv -f ${WIC_DIRECT} ${WIC_IMAGE_FILE} + mv -f ${WIC_DIRECT}.bmap ${WIC_IMAGE_FILE}.bmap + rm -rf ${BUILDCHROOT_DIR}/${WICTMP} } do_wic_image[file-checksums] += "${WKS_FILE_CHECKSUM}" -- 2.20.1