Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Ed Bartosh <ed.bartosh@linux.intel.com>
To: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH v2] wic: remove intermediate partitions
Date: Fri, 15 May 2015 09:45:36 +0300	[thread overview]
Message-ID: <20150515064536.GA23106@linux.intel.com> (raw)
In-Reply-To: <1431112634-16635-1-git-send-email-alexandre.belloni@free-electrons.com>

Hi Alexandre,

Thank you for the patch! Sorry for delayed review. I was on vacation.

Acked-by: Ed Bartosh <ed.bartosh@linux.intel.com>

On Fri, May 08, 2015 at 09:17:14PM +0200, Alexandre Belloni wrote:
> Remove intermediate partitions that may have been created by a previous
> wic invocation. Those partitions are causing issues on some systems. In
> particular vfat partition creation is hanging on mcopy execution on
> Fedora.
> 
> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> ---
> 
> Changes in v2:
>  - use os.remove instead of executing rm directly.
> 
>  scripts/lib/wic/kickstart/custom_commands/partition.py | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/scripts/lib/wic/kickstart/custom_commands/partition.py b/scripts/lib/wic/kickstart/custom_commands/partition.py
> index ff906010b8bf..e864076c992d 100644
> --- a/scripts/lib/wic/kickstart/custom_commands/partition.py
> +++ b/scripts/lib/wic/kickstart/custom_commands/partition.py
> @@ -230,6 +230,7 @@ class Wic_PartData(Mic_PartData):
>          image_rootfs = rootfs_dir
>          rootfs = "%s/rootfs_%s.%s" % (cr_workdir, self.label ,self.fstype)
>  
> +        os.remove(rootfs)
>          du_cmd = "du -ks %s" % image_rootfs
>          out = exec_cmd(du_cmd)
>          actual_rootfs_size = int(out.split()[0])
> @@ -281,6 +282,7 @@ class Wic_PartData(Mic_PartData):
>          image_rootfs = rootfs_dir
>          rootfs = "%s/rootfs_%s.%s" % (cr_workdir, self.label, self.fstype)
>  
> +        os.remove(rootfs)
>          du_cmd = "du -ks %s" % image_rootfs
>          out = exec_cmd(du_cmd)
>          actual_rootfs_size = int(out.split()[0])
> @@ -325,6 +327,7 @@ class Wic_PartData(Mic_PartData):
>          image_rootfs = rootfs_dir
>          rootfs = "%s/rootfs_%s.%s" % (cr_workdir, self.label, self.fstype)
>  
> +        os.remove(rootfs)
>          du_cmd = "du -bks %s" % image_rootfs
>          out = exec_cmd(du_cmd)
>          blocks = int(out.split()[0])
> @@ -377,6 +380,7 @@ class Wic_PartData(Mic_PartData):
>          image_rootfs = rootfs_dir
>          rootfs = "%s/rootfs_%s.%s" % (cr_workdir, self.label ,self.fstype)
>  
> +        os.remove(rootfs)
>          squashfs_cmd = "mksquashfs %s %s -noappend" % \
>                         (image_rootfs, rootfs)
>          exec_native_cmd(pseudo + squashfs_cmd, native_sysroot)
> @@ -415,6 +419,7 @@ class Wic_PartData(Mic_PartData):
>          """
>          fs = "%s/fs_%s.%s" % (cr_workdir, self.label, self.fstype)
>  
> +        os.remove(fs)
>          dd_cmd = "dd if=/dev/zero of=%s bs=1k seek=%d count=0" % \
>              (fs, self.size)
>          exec_cmd(dd_cmd)
> @@ -442,6 +447,7 @@ class Wic_PartData(Mic_PartData):
>          """
>          fs = "%s/fs_%s.%s" % (cr_workdir, self.label, self.fstype)
>  
> +        os.remove(fs)
>          dd_cmd = "dd if=/dev/zero of=%s bs=1k seek=%d count=0" % \
>              (fs, self.size)
>          exec_cmd(dd_cmd)
> @@ -466,6 +472,7 @@ class Wic_PartData(Mic_PartData):
>          Prepare an empty vfat partition.
>          """
>          fs = "%s/fs_%s.%s" % (cr_workdir, self.label, self.fstype)
> +        os.remove(fs)
>  
>          blocks = self.size
>  
> @@ -492,6 +499,7 @@ class Wic_PartData(Mic_PartData):
>                        "Proceeding as requested." % self.mountpoint)
>  
>          fs = "%s/fs_%s.%s" % (cr_workdir, self.label, self.fstype)
> +        os.remove(fs)
>  
>          # it is not possible to create a squashfs without source data,
>          # thus prepare an empty temp dir that is used as source
> -- 
> 2.1.4
> 

-- 
--
Regards,
Ed


      reply	other threads:[~2015-05-15  8:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-08 19:17 [PATCH v2] wic: remove intermediate partitions Alexandre Belloni
2015-05-15  6:45 ` Ed Bartosh [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150515064536.GA23106@linux.intel.com \
    --to=ed.bartosh@linux.intel.com \
    --cc=alexandre.belloni@free-electrons.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox