summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/rootfs.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oe/rootfs.py')
-rw-r--r--meta/lib/oe/rootfs.py30
1 files changed, 13 insertions, 17 deletions
diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py
index 8cd48f9450..14befac8fa 100644
--- a/meta/lib/oe/rootfs.py
+++ b/meta/lib/oe/rootfs.py
@@ -199,12 +199,12 @@ class Rootfs(object, metaclass=ABCMeta):
199 if command in commands: 199 if command in commands:
200 commands.remove(command) 200 commands.remove(command)
201 commands.append(command) 201 commands.append(command)
202 return "".join(commands) 202 return " ".join(commands)
203 203
204 # We want this to run as late as possible, in particular after 204 # We want this to run as late as possible, in particular after
205 # systemd_sysusers_create and set_user_group. Using :append is not enough 205 # systemd_sysusers_create and set_user_group. Using :append is not enough
206 make_last("tidy_shadowutils_files", post_process_cmds) 206 post_process_cmds = make_last("tidy_shadowutils_files", post_process_cmds)
207 make_last("rootfs_reproducible", post_process_cmds) 207 post_process_cmds = make_last("rootfs_reproducible", post_process_cmds)
208 208
209 execute_pre_post_process(self.d, pre_process_cmds) 209 execute_pre_post_process(self.d, pre_process_cmds)
210 210
@@ -269,7 +269,11 @@ class Rootfs(object, metaclass=ABCMeta):
269 self.pm.remove(["run-postinsts"]) 269 self.pm.remove(["run-postinsts"])
270 270
271 image_rorfs = bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", 271 image_rorfs = bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs",
272 True, False, self.d) and \
273 not bb.utils.contains("IMAGE_FEATURES",
274 "read-only-rootfs-delayed-postinsts",
272 True, False, self.d) 275 True, False, self.d)
276
273 image_rorfs_force = self.d.getVar('FORCE_RO_REMOVE') 277 image_rorfs_force = self.d.getVar('FORCE_RO_REMOVE')
274 278
275 if image_rorfs or image_rorfs_force == "1": 279 if image_rorfs or image_rorfs_force == "1":
@@ -358,11 +362,12 @@ class Rootfs(object, metaclass=ABCMeta):
358 362
359 versioned_modules_dir = os.path.join(self.image_rootfs, modules_dir, kernel_ver) 363 versioned_modules_dir = os.path.join(self.image_rootfs, modules_dir, kernel_ver)
360 364
361 bb.utils.mkdirhier(versioned_modules_dir) 365 if os.path.exists(versioned_modules_dir):
362 366 bb.note("Running depmodwrapper for %s ..." % versioned_modules_dir)
363 bb.note("Running depmodwrapper for %s ..." % versioned_modules_dir) 367 if self._exec_shell_cmd(['depmodwrapper', '-a', '-b', self.image_rootfs, kernel_ver, kernel_package_name]):
364 if self._exec_shell_cmd(['depmodwrapper', '-a', '-b', self.image_rootfs, kernel_ver, kernel_package_name]): 368 bb.fatal("Kernel modules dependency generation failed")
365 bb.fatal("Kernel modules dependency generation failed") 369 else:
370 bb.note("Not running depmodwrapper for %s since directory does not exist" % versioned_modules_dir)
366 371
367 """ 372 """
368 Create devfs: 373 Create devfs:
@@ -423,12 +428,3 @@ def image_list_installed_packages(d, rootfs_dir=None):
423 import importlib 428 import importlib
424 cls = importlib.import_module('oe.package_manager.' + img_type) 429 cls = importlib.import_module('oe.package_manager.' + img_type)
425 return cls.PMPkgsList(d, rootfs_dir).list_pkgs() 430 return cls.PMPkgsList(d, rootfs_dir).list_pkgs()
426
427if __name__ == "__main__":
428 """
429 We should be able to run this as a standalone script, from outside bitbake
430 environment.
431 """
432 """
433 TBD
434 """