[OE-core] [PATCH 2/2] image.bbclass: improve reproducibility

Burton, Ross ross.burton at intel.com
Tue Nov 21 10:59:49 UTC 2017


I think this is to blame for a slew of failures on the autobuilder:

http://errors.yoctoproject.org/Errors/Latest/?filter=57ddf212e64207edfbd813d32ca3a15f6c1c8211&type=commit

Such as:

NOTE: FAIL [0.616s]: test_df (df.DfTest)
NOTE: ----------------------------------------------------------------------
NOTE: Traceback (most recent call last):
  File
"/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-mips-lsb/build/meta/lib/oeqa/core/decorator/__init__.py",
line 32, in wrapped_f
    return func(*args, **kwargs)
  File
"/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-mips-lsb/build/meta/lib/oeqa/core/decorator/__init__.py",
line 32, in wrapped_f
    return func(*args, **kwargs)
  File
"/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-mips-lsb/build/meta/lib/oeqa/runtime/cases/df.py",
line 13, in test_df
    self.assertTrue(int(output)>5120, msg=msg)
AssertionError: False is not true : Not enough space on image. Current size
is 0

Ross

On 16 November 2017 at 15:56, Maxin B. John <maxin.john at intel.com> wrote:
>
> Improve reproducibility of builds by adding --apparent-size to du -ks in
> get_rootfs_size
>
> [YOCTO #12235]
>
> Signed-off-by: Maxin B. John <maxin.john at intel.com>
> ---
>  meta/classes/image.bbclass | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
> index 0d14250..a24a561 100644
> --- a/meta/classes/image.bbclass
> +++ b/meta/classes/image.bbclass
> @@ -524,7 +524,7 @@ def get_rootfs_size(d):
>      initramfs_fstypes = d.getVar('INITRAMFS_FSTYPES') or ''
>      initramfs_maxsize = d.getVar('INITRAMFS_MAXSIZE')
>
> -    output = subprocess.check_output(['du', '-ks',
> +    output = subprocess.check_output(['du', '--apparent-size', '-ks',
>                                        d.getVar('IMAGE_ROOTFS')])
>      size_kb = int(output.split()[0])
>      base_size = size_kb * overhead_factor
> --
> 2.4.0
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20171121/9e89d77a/attachment-0002.html>


More information about the Openembedded-core mailing list