All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] wic: bootimg-partition: Stop removing whole workdir
@ 2015-02-04 22:49 Alexandre Belloni
  2015-02-04 23:18 ` Tom Zanussi
  2015-02-05 22:01 ` Tom Zanussi
  0 siblings, 2 replies; 5+ messages in thread
From: Alexandre Belloni @ 2015-02-04 22:49 UTC (permalink / raw)
  To: Tom Zanussi; +Cc: openembedded-core

Stop removing the whole working directory as this is also removing
eventual previously created partition images, leading to image creation
failures.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
 scripts/lib/wic/plugins/source/bootimg-partition.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/lib/wic/plugins/source/bootimg-partition.py b/scripts/lib/wic/plugins/source/bootimg-partition.py
index 6ba39a01f700..c5eb7b8b801b 100644
--- a/scripts/lib/wic/plugins/source/bootimg-partition.py
+++ b/scripts/lib/wic/plugins/source/bootimg-partition.py
@@ -66,7 +66,7 @@ class BootimgPartitionPlugin(SourcePlugin):
         - copies all files listed in IMAGE_BOOT_FILES variable
         """
         hdddir = "%s/boot" % cr_workdir
-        rm_cmd = "rm -rf %s" % cr_workdir
+        rm_cmd = "rm -rf %s/boot" % cr_workdir
         exec_cmd(rm_cmd)
 
         install_cmd = "install -d %s" % hdddir
-- 
2.1.0



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

* Re: [PATCH] wic: bootimg-partition: Stop removing whole workdir
  2015-02-04 22:49 [PATCH] wic: bootimg-partition: Stop removing whole workdir Alexandre Belloni
@ 2015-02-04 23:18 ` Tom Zanussi
  2015-02-04 23:39   ` Alexandre Belloni
  2015-02-05 22:01 ` Tom Zanussi
  1 sibling, 1 reply; 5+ messages in thread
From: Tom Zanussi @ 2015-02-04 23:18 UTC (permalink / raw)
  To: Alexandre Belloni; +Cc: openembedded-core

On Wed, 2015-02-04 at 23:49 +0100, Alexandre Belloni wrote:
> Stop removing the whole working directory as this is also removing
> eventual previously created partition images, leading to image creation
> failures.
> 

I'm surprised - I've never run into a problem like this.  Can you give
more details and/or a reproducer?

Thanks,

Tom

> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> ---
>  scripts/lib/wic/plugins/source/bootimg-partition.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/lib/wic/plugins/source/bootimg-partition.py b/scripts/lib/wic/plugins/source/bootimg-partition.py
> index 6ba39a01f700..c5eb7b8b801b 100644
> --- a/scripts/lib/wic/plugins/source/bootimg-partition.py
> +++ b/scripts/lib/wic/plugins/source/bootimg-partition.py
> @@ -66,7 +66,7 @@ class BootimgPartitionPlugin(SourcePlugin):
>          - copies all files listed in IMAGE_BOOT_FILES variable
>          """
>          hdddir = "%s/boot" % cr_workdir
> -        rm_cmd = "rm -rf %s" % cr_workdir
> +        rm_cmd = "rm -rf %s/boot" % cr_workdir
>          exec_cmd(rm_cmd)
>  
>          install_cmd = "install -d %s" % hdddir




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

* Re: [PATCH] wic: bootimg-partition: Stop removing whole workdir
  2015-02-04 23:18 ` Tom Zanussi
@ 2015-02-04 23:39   ` Alexandre Belloni
  2015-02-05  8:36     ` Maciej Borzecki
  0 siblings, 1 reply; 5+ messages in thread
From: Alexandre Belloni @ 2015-02-04 23:39 UTC (permalink / raw)
  To: Tom Zanussi; +Cc: openembedded-core

On 04/02/2015 at 17:18:15 -0600, Tom Zanussi wrote :
> On Wed, 2015-02-04 at 23:49 +0100, Alexandre Belloni wrote:
> > Stop removing the whole working directory as this is also removing
> > eventual previously created partition images, leading to image creation
> > failures.
> > 
> 
> I'm surprised - I've never run into a problem like this.  Can you give
> more details and/or a reproducer?
> 

Sure, something like that in your wks will fail:
part / --source rootfs --ondisk mmcblk --fstype=ext4 --label root --align 4
part /boot --source bootimg-partition --ondisk mmcblk --fstype=vfat --label boot --active --align 4 --size 16

The error being:
Error: exec_cmd: dd if=/var/tmp/wic/build/rootfs_root.ext4
of=/var/tmp/wic/build/test-201502050034-mmcblk.direct bs=512 seek=8
count=294174 conv=notrunc returned '1' instead of 0

Using bootimg-partition anywhere but in the first position will fail
because the previously generated fs images (in my example
rootfs_root.ext4) will be removed.

> Thanks,
> 
> Tom
> 
> > Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> > ---
> >  scripts/lib/wic/plugins/source/bootimg-partition.py | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/scripts/lib/wic/plugins/source/bootimg-partition.py b/scripts/lib/wic/plugins/source/bootimg-partition.py
> > index 6ba39a01f700..c5eb7b8b801b 100644
> > --- a/scripts/lib/wic/plugins/source/bootimg-partition.py
> > +++ b/scripts/lib/wic/plugins/source/bootimg-partition.py
> > @@ -66,7 +66,7 @@ class BootimgPartitionPlugin(SourcePlugin):
> >          - copies all files listed in IMAGE_BOOT_FILES variable
> >          """
> >          hdddir = "%s/boot" % cr_workdir
> > -        rm_cmd = "rm -rf %s" % cr_workdir
> > +        rm_cmd = "rm -rf %s/boot" % cr_workdir
> >          exec_cmd(rm_cmd)
> >  
> >          install_cmd = "install -d %s" % hdddir
> 
> 

-- 
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com


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

* Re: [PATCH] wic: bootimg-partition: Stop removing whole workdir
  2015-02-04 23:39   ` Alexandre Belloni
@ 2015-02-05  8:36     ` Maciej Borzecki
  0 siblings, 0 replies; 5+ messages in thread
From: Maciej Borzecki @ 2015-02-05  8:36 UTC (permalink / raw)
  To: Alexandre Belloni; +Cc: Tom Zanussi, openembedded-core

On 02/05 00:39, Alexandre Belloni wrote:
> On 04/02/2015 at 17:18:15 -0600, Tom Zanussi wrote :
> > On Wed, 2015-02-04 at 23:49 +0100, Alexandre Belloni wrote:
> > > Stop removing the whole working directory as this is also removing
> > > eventual previously created partition images, leading to image creation
> > > failures.
> > >
> >
> > I'm surprised - I've never run into a problem like this.  Can you give
> > more details and/or a reproducer?
> >
>
> Sure, something like that in your wks will fail:
> part / --source rootfs --ondisk mmcblk --fstype=ext4 --label root --align 4
> part /boot --source bootimg-partition --ondisk mmcblk --fstype=vfat --label boot --active --align 4 --size 16
>
> The error being:
> Error: exec_cmd: dd if=/var/tmp/wic/build/rootfs_root.ext4
> of=/var/tmp/wic/build/test-201502050034-mmcblk.direct bs=512 seek=8
> count=294174 conv=notrunc returned '1' instead of 0
>
> Using bootimg-partition anywhere but in the first position will fail
> because the previously generated fs images (in my example
> rootfs_root.ext4) will be removed.
>

Acked-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl>

--
Maciej Borzęcki
Senior Software Developer at Open-RnD Sp. z o.o., Poland
www.open-rnd.pl
mobile: +48 889 117 365, fax: +48 42 657 9079


Niniejsza wiadomość wraz z załącznikami może
zawierać chronione prawem lub poufne informacje i została
wysłana wyłącznie do wiadomości i użytku osób, do których
została zaadresowana. Jeśli wiadomość została otrzymana
przypadkowo zabrania się jej kopiowania lub rozsyłania do osób
trzecich. W takim przypadku uprasza się o natychmiastowe
zniszczenie wiadomości oraz poinformowanie nadawcy o
zaistniałej sytuacji za pomocą wiadomości zwrotnej.
Dziękujemy.

This message, including any attachments hereto,
may contain privileged or confidential information and is sent
solely for the attention and use of the intended addressee(s).
If you are not an intended addressee, you may neither use this
message nor copy or deliver it to anyone. In such case, you
should immediately destroy this message and kindly notify the
sender by reply email. Thank you.


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

* Re: [PATCH] wic: bootimg-partition: Stop removing whole workdir
  2015-02-04 22:49 [PATCH] wic: bootimg-partition: Stop removing whole workdir Alexandre Belloni
  2015-02-04 23:18 ` Tom Zanussi
@ 2015-02-05 22:01 ` Tom Zanussi
  1 sibling, 0 replies; 5+ messages in thread
From: Tom Zanussi @ 2015-02-05 22:01 UTC (permalink / raw)
  To: Alexandre Belloni; +Cc: openembedded-core

On Wed, 2015-02-04 at 23:49 +0100, Alexandre Belloni wrote:
> Stop removing the whole working directory as this is also removing
> eventual previously created partition images, leading to image creation
> failures.
> 
> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>

Acked-by: Tom Zanussi >tom.zanussi@linux.intel.com>

> ---
>  scripts/lib/wic/plugins/source/bootimg-partition.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/lib/wic/plugins/source/bootimg-partition.py b/scripts/lib/wic/plugins/source/bootimg-partition.py
> index 6ba39a01f700..c5eb7b8b801b 100644
> --- a/scripts/lib/wic/plugins/source/bootimg-partition.py
> +++ b/scripts/lib/wic/plugins/source/bootimg-partition.py
> @@ -66,7 +66,7 @@ class BootimgPartitionPlugin(SourcePlugin):
>          - copies all files listed in IMAGE_BOOT_FILES variable
>          """
>          hdddir = "%s/boot" % cr_workdir
> -        rm_cmd = "rm -rf %s" % cr_workdir
> +        rm_cmd = "rm -rf %s/boot" % cr_workdir
>          exec_cmd(rm_cmd)
>  
>          install_cmd = "install -d %s" % hdddir
> -- 
> 2.1.0
> 




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

end of thread, other threads:[~2015-02-05 22:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-04 22:49 [PATCH] wic: bootimg-partition: Stop removing whole workdir Alexandre Belloni
2015-02-04 23:18 ` Tom Zanussi
2015-02-04 23:39   ` Alexandre Belloni
2015-02-05  8:36     ` Maciej Borzecki
2015-02-05 22:01 ` Tom Zanussi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.