* [PATCH v2] wic-image: Fix up file ownership in isar repo after wic run
@ 2018-08-23 12:03 Jan Kiszka
0 siblings, 0 replies; only message in thread
From: Jan Kiszka @ 2018-08-23 12:03 UTC (permalink / raw)
To: isar-users; +Cc: Henning Schild
This prevents needlessly leaving the __pycache__ directories root-owned
behind after running wic as superuser - will only cause troubles to the
user when trying to clean up the isar repo.
We update the ownership only for selected subdirs of the repo to avoid
touching local files.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
Changes in v2:
- avoid touching unrelated top-level directories
meta/classes/wic-img.bbclass | 1 +
1 file changed, 1 insertion(+)
diff --git a/meta/classes/wic-img.bbclass b/meta/classes/wic-img.bbclass
index b56df7b..1bbf2ff 100644
--- a/meta/classes/wic-img.bbclass
+++ b/meta/classes/wic-img.bbclass
@@ -71,6 +71,7 @@ do_wic_image() {
export MTOOLS_SKIP_CHECK=1
sudo -E chroot ${BUILDCHROOT_DIR} ${ISARROOT}/scripts/wic create ${WKS_FILE} --vars "${STAGING_DIR}/${MACHINE}/imgdata/" -o /tmp/ -e ${IMAGE_BASENAME} ${WIC_CREATE_EXTRA_ARGS}
+ sudo chown -R $(stat -c "%U" ${ISARROOT}) ${ISARROOT}/meta ${ISARROOT}/scripts
cp -f `ls -t -1 ${BUILDCHROOT_DIR}/tmp/${WKS_FILE}*.direct | head -1` ${WIC_IMAGE_FILE}
}
--
2.16.4
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-08-23 12:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-23 12:03 [PATCH v2] wic-image: Fix up file ownership in isar repo after wic run Jan Kiszka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox