summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe
diff options
context:
space:
mode:
authorDamian Wrobel <dwrobel@ertelnet.rybnik.pl>2021-07-27 12:11:46 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-07-28 23:47:00 +0100
commit5b267b39837d3d19a6502b978f92f9310190d1d5 (patch)
tree695b08bc41b489dbe73e79b14e3eee1022dc875f /meta/lib/oe
parent356137bcf23eabaacbefddf265edb638e0f3fe1d (diff)
downloadpoky-5b267b39837d3d19a6502b978f92f9310190d1d5.tar.gz
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>
Diffstat (limited to 'meta/lib/oe')
-rw-r--r--meta/lib/oe/rootfs.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py
index ad9fd77c8b..4ea5adb9f4 100644
--- a/meta/lib/oe/rootfs.py
+++ b/meta/lib/oe/rootfs.py
@@ -302,6 +302,16 @@ class Rootfs(object, metaclass=ABCMeta):
302 self._exec_shell_cmd(['ldconfig', '-r', self.image_rootfs, '-c', 302 self._exec_shell_cmd(['ldconfig', '-r', self.image_rootfs, '-c',
303 'new', '-v', '-X']) 303 'new', '-v', '-X'])
304 304
305 image_rorfs = bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs",
306 True, False, self.d)
307 ldconfig_in_features = bb.utils.contains("DISTRO_FEATURES", "ldconfig",
308 True, False, self.d)
309 if image_rorfs or not ldconfig_in_features:
310 ldconfig_cache_dir = os.path.join(self.image_rootfs, "var/cache/ldconfig")
311 if os.path.exists(ldconfig_cache_dir):
312 bb.note("Removing ldconfig auxiliary cache...")
313 shutil.rmtree(ldconfig_cache_dir)
314
305 def _check_for_kernel_modules(self, modules_dir): 315 def _check_for_kernel_modules(self, modules_dir):
306 for root, dirs, files in os.walk(modules_dir, topdown=True): 316 for root, dirs, files in os.walk(modules_dir, topdown=True):
307 for name in files: 317 for name in files: