mirror of
https://git.yoctoproject.org/poky
synced 2026-04-30 03:32:12 +02:00
rootfs: remove ldconfig auxiliary cache where appropriate
Removes the /var/cache/ldconfig auxiliary cache directory from the rootfs when: - read-only-rootfs is in IMAGE_FEATURES, - ldconfig is not in DISTRO_FEATURES. In both cases the /var/cache/ldconfig/aux-cache is useless. (From OE-Core rev: e7a18904582b27fd12a437ff4d8d25c625af7696) Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
356137bcf2
commit
5b267b3983
@@ -302,6 +302,16 @@ 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("DISTRO_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")
|
||||
if os.path.exists(ldconfig_cache_dir):
|
||||
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:
|
||||
|
||||
Reference in New Issue
Block a user