public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] wic-img: Allow chown to fail
@ 2018-09-13  8:30 Henning Schild
  2018-09-25 17:38 ` Maxim Yu. Osipov
  0 siblings, 1 reply; 2+ messages in thread
From: Henning Schild @ 2018-09-13  8:30 UTC (permalink / raw)
  To: isar-users; +Cc: Henning Schild

f13b2bf71dd841 introduced chowning of possible python cache files. This
operation can fail if the file system where Isar resides is read-only,
in which case there will also be no python cache files.

Simply allow this step to fail, even other failures would not be
problematic because it is a convenience thing to execute the chown.

Signed-off-by: Henning Schild <henning.schild@siemens.com>
---
 meta/classes/wic-img.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/wic-img.bbclass b/meta/classes/wic-img.bbclass
index 635fbbf..a58d05b 100644
--- a/meta/classes/wic-img.bbclass
+++ b/meta/classes/wic-img.bbclass
@@ -75,7 +75,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}/meta-isar ${ISARROOT}/scripts
+    sudo chown -R $(stat -c "%U" ${ISARROOT}) ${ISARROOT}/meta ${ISARROOT}/meta-isar ${ISARROOT}/scripts || true
     cp -f `ls -t -1 ${BUILDCHROOT_DIR}/tmp/${WKS_FILE}*.direct | head -1` ${WIC_IMAGE_FILE}
 }
 
-- 
2.19.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] wic-img: Allow chown to fail
  2018-09-13  8:30 [PATCH] wic-img: Allow chown to fail Henning Schild
@ 2018-09-25 17:38 ` Maxim Yu. Osipov
  0 siblings, 0 replies; 2+ messages in thread
From: Maxim Yu. Osipov @ 2018-09-25 17:38 UTC (permalink / raw)
  To: Henning Schild, isar-users

On 9/13/18 11:30 AM, Henning Schild wrote:
> f13b2bf71dd841 introduced chowning of possible python cache files. This
> operation can fail if the file system where Isar resides is read-only,
> in which case there will also be no python cache files.
> 
> Simply allow this step to fail, even other failures would not be
> problematic because it is a convenience thing to execute the chown.

Applied to the 'next',

Thanks,
Maxim.

> Signed-off-by: Henning Schild <henning.schild@siemens.com>
> ---
>   meta/classes/wic-img.bbclass | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/classes/wic-img.bbclass b/meta/classes/wic-img.bbclass
> index 635fbbf..a58d05b 100644
> --- a/meta/classes/wic-img.bbclass
> +++ b/meta/classes/wic-img.bbclass
> @@ -75,7 +75,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}/meta-isar ${ISARROOT}/scripts
> +    sudo chown -R $(stat -c "%U" ${ISARROOT}) ${ISARROOT}/meta ${ISARROOT}/meta-isar ${ISARROOT}/scripts || true
>       cp -f `ls -t -1 ${BUILDCHROOT_DIR}/tmp/${WKS_FILE}*.direct | head -1` ${WIC_IMAGE_FILE}
>   }
>   
> 


-- 
Maxim Osipov
ilbers GmbH
Maria-Merian-Str. 8
85521 Ottobrunn
Germany
+49 (151) 6517 6917
mosipov@ilbers.de
http://ilbers.de/
Commercial register Munich, HRB 214197
General Manager: Baurzhan Ismagulov

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-09-25 17:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-13  8:30 [PATCH] wic-img: Allow chown to fail Henning Schild
2018-09-25 17:38 ` Maxim Yu. Osipov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox