public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: Ed Bartosh <ed.bartosh@linux.intel.com>
To: Maciej Borzecki <maciej.borzecki@rndity.com>
Cc: Maciej Borzecki <maciek.borzecki@gmail.com>,
	openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 2/5] wic: use partition size when creating empty partition files
Date: Wed, 9 Nov 2016 11:23:31 +0200	[thread overview]
Message-ID: <20161109092331.GA10823@linux.intel.com> (raw)
In-Reply-To: <927e5e94d6d20caf9b59e8e57895742f9ebebff8.1478619682.git.maciej.borzecki@rndity.com>

On Tue, Nov 08, 2016 at 04:56:08PM +0100, Maciej Borzecki wrote:
> It seems that prepare_empty_partition_ext() and
> prepare_empty_partition_btrfs() got broken in commit
> c8669749e37fe865c197c98d5671d9de176ff4dd, thus one could observe the
> following backtrace:
> 
> Backtrace:
>   File "<snip>/poky/scripts/lib/wic/plugins/imager/direct_plugin.py", line 93, in do_create
>     creator.create()
>   File "<snip>/poky/scripts/lib/wic/imager/baseimager.py", line 159, in create
>     self._create()
>   File "<snip>/poky/scripts/lib/wic/imager/direct.py", line 290, in _create
>     self.bootimg_dir, self.kernel_dir, self.native_sysroot)
>   File "<snip>/poky/scripts/lib/wic/partition.py", line 146, in prepare
>     method(rootfs, oe_builddir, native_sysroot)
>   File "<snip>/poky/scripts/lib/wic/partition.py", line 325, in prepare_empty_partition_ext
>     os.ftruncate(sparse.fileno(), rootfs_size * 1024)
> NameError: name 'rootfs_size' is not defined
> 
> Signed-off-by: Maciej Borzecki <maciej.borzecki@rndity.com>
> ---
>  scripts/lib/wic/partition.py | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/scripts/lib/wic/partition.py b/scripts/lib/wic/partition.py
> index 4b8d769437120adadb5dba2f3919d4eb96141292..8adc698240c8e3bd9f4118663a5d7a167e0bb4a4 100644
> --- a/scripts/lib/wic/partition.py
> +++ b/scripts/lib/wic/partition.py
> @@ -308,7 +308,7 @@ class Partition():
>          Prepare an empty ext2/3/4 partition.
>          """
>          with open(rootfs, 'w') as sparse:
> -            os.ftruncate(sparse.fileno(), rootfs_size * 1024)
> +            os.ftruncate(sparse.fileno(), self.size * 1024)
>  
>          extra_imagecmd = "-i 8192"
>  
> @@ -326,7 +326,7 @@ class Partition():
>          Prepare an empty btrfs partition.
>          """
>          with open(rootfs, 'w') as sparse:
> -            os.ftruncate(sparse.fileno(), rootfs_size * 1024)
> +            os.ftruncate(sparse.fileno(), self.size * 1024)
>  
>          label_str = ""
>          if self.label:

Thank you for the fix. Sorry for breaking this. I thought I
double-checked and all tests were passing :(


--
Regards,
Ed


  reply	other threads:[~2016-11-09  9:24 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-08 15:56 [PATCH 0/5] wic: bugfixes & --fixed-size support Maciej Borzecki
2016-11-08 15:56 ` [PATCH 1/5] wic: make sure that partition size is always an integer in internal processing Maciej Borzecki
2016-11-08 15:56 ` [PATCH 2/5] wic: use partition size when creating empty partition files Maciej Borzecki
2016-11-09  9:23   ` Ed Bartosh [this message]
2016-11-08 15:56 ` [PATCH 3/5] wic: check that filesystem is specified for a rootfs partition Maciej Borzecki
2016-11-09  9:44   ` Ed Bartosh
2016-11-09 10:42     ` Maciej Borzęcki
2016-11-08 15:56 ` [PATCH 4/5] wic: fix function comment typos Maciej Borzecki
2016-11-08 15:56 ` [PATCH 5/5] wic: add --fixed-size wks option Maciej Borzecki
2016-11-09  9:36   ` Ed Bartosh
2016-11-09 12:08     ` Maciej Borzęcki
2016-11-09  9:39 ` [PATCH 0/5] wic: bugfixes & --fixed-size support Ed Bartosh
2016-11-09 13:17 ` Burton, Ross
2016-11-09 13:49   ` Maciej Borzęcki

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=20161109092331.GA10823@linux.intel.com \
    --to=ed.bartosh@linux.intel.com \
    --cc=maciej.borzecki@rndity.com \
    --cc=maciek.borzecki@gmail.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