Openembedded Core Discussions
 help / color / mirror / Atom feed
From: "Alexandre Belloni" <alexandre.belloni@bootlin.com>
To: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH] rootfs: remove ldconfig auxiliary cache where appropriate
Date: Fri, 23 Jul 2021 00:37:08 +0200	[thread overview]
Message-ID: <YPnzFOuJhmDW/kb4@piout.net> (raw)
In-Reply-To: <20210722094822.1102062-1-dwrobel@ertelnet.rybnik.pl>

On 22/07/2021 11:48:22+0200, Damian Wrobel wrote:
> Removes the /var/cache/ldconfig auxiliary cache directory from
> the rootfs when:
>  - read-only-rootfs is in DISTRO_FEATURES,
>  - ldconfig is not in DISTRO_FEATURES.
> 
> In both cases the /var/cache/ldconfig/aux-cache is useless.
> 

This breaks the do_rootfs task of most of the builds with:

Exception: FileNotFoundError: [Errno 2] No such file or directory: '/home/pokybuild/yocto-worker/qemuarm64-ltp/build/build/tmp/work/qemuarm64-poky-linux/core-image-sato/1.0-r0/rootfs/var/cache/ldconfig'
ERROR: Logfile of failure stored in: /home/pokybuild/yocto-worker/qemuarm64-ltp/build/build/tmp/work/qemuarm64-poky-linux/core-image-sato/1.0-r0/temp/log.do_rootfs.51846
NOTE: recipe core-image-sato-1.0-r0: task do_rootfs: Failed
ERROR: Task (/home/pokybuild/yocto-worker/qemuarm64-ltp/build/meta/recipes-sato/images/core-image-sato.bb:do_rootfs) failed with exit code '1'

Example here:
https://autobuilder.yoctoproject.org/typhoon/#/builders/96/builds/1983/steps/11/logs/stdio

> Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
> ---
>  meta/lib/oe/rootfs.py | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py
> index ad9fd77c8b..80673fab3f 100644
> --- a/meta/lib/oe/rootfs.py
> +++ b/meta/lib/oe/rootfs.py
> @@ -302,6 +302,15 @@ class Rootfs(object, metaclass=ABCMeta):
>              self._exec_shell_cmd(['ldconfig', '-r', self.image_rootfs, '-c',
>                                    'new', '-v', '-X'])
>  
> +        image_rorfs = bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs",
> +                                        True, False, self.d)
> +        ldconfig_in_features = bb.utils.contains("IMAGE_FEATURES", "ldconfig",
> +                                                 True, False, self.d)
> +        if image_rorfs or not ldconfig_in_features:
> +            ldconfig_cache_dir = os.path.join(self.image_rootfs, "var/cache/ldconfig")
> +            bb.note("Removing ldconfig auxiliary cache...")
> +            shutil.rmtree(ldconfig_cache_dir)
> +
>      def _check_for_kernel_modules(self, modules_dir):
>          for root, dirs, files in os.walk(modules_dir, topdown=True):
>              for name in files:
> -- 
> 2.31.1
> 

> 
> 
> 


-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

  parent reply	other threads:[~2021-07-22 22:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-22  9:48 [PATCH] rootfs: remove ldconfig auxiliary cache where appropriate Damian Wrobel
2021-07-22 19:00 ` [OE-core] " Andre McCurdy
2021-07-23  9:16   ` Damian Wrobel
2021-07-23 18:15     ` Andre McCurdy
2021-07-22 22:37 ` Alexandre Belloni [this message]
2021-07-23  9:18   ` Damian Wrobel
2021-07-23  9:21   ` [PATCH v2] " Damian Wrobel
2021-07-23 18:21     ` [OE-core] " Andre McCurdy
2021-07-27 10:11       ` Damian Wrobel
2021-07-27 10:11   ` [PATCH v3] " Damian Wrobel

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=YPnzFOuJhmDW/kb4@piout.net \
    --to=alexandre.belloni@bootlin.com \
    --cc=dwrobel@ertelnet.rybnik.pl \
    --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