aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2015-07-27 20:10:03 -0700
committerRobert Yang <liezhi.yang@windriver.com>2015-07-27 20:10:03 -0700
commit4ca40864d2a4894bb630e2bed60a299e38c53afb (patch)
tree0de48ae1c8c345bc8afea38cd63b1c4df9085964
parent27d068d05239c26a3848eb101571acab54635e37 (diff)
downloadopenembedded-core-contrib-rbt/post.tar.gz
openembedded-core-contrib-rbt/post.tar.bz2
openembedded-core-contrib-rbt/post.zip
rootfs.py: fix PRE/POSTPROCESS_COMMANDS for rpm and debrbt/post
The rpm didn't run RPM_PREPROCESS_COMMANDS or RPM_POSTPROCESS_COMMANDS, the similar to deb, this patch fix the problem. And fix a typo: DEB_POSTPROCESS_COMMAND -> DEB_POSTPROCESS_COMMANDS Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-rw-r--r--meta/lib/oe/rootfs.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py
index 0bd1cf632f..8c8244c453 100644
--- a/meta/lib/oe/rootfs.py
+++ b/meta/lib/oe/rootfs.py
@@ -408,10 +408,14 @@ class RpmRootfs(Rootfs):
def _create(self):
pkgs_to_install = self.manifest.parse_initial_manifest()
+ rpm_pre_process_cmds = self.d.getVar('RPM_PREPROCESS_COMMANDS', True)
+ rpm_post_process_cmds = self.d.getVar('RPM_POSTPROCESS_COMMANDS', True)
# update PM index files
self.pm.write_index()
+ execute_pre_post_process(self.d, rpm_pre_process_cmds)
+
self.pm.dump_all_available_pkgs()
if self.inc_rpm_image_gen == "1":
@@ -435,6 +439,10 @@ class RpmRootfs(Rootfs):
self._setup_dbg_rootfs(['/etc/rpm', '/var/lib/rpm', '/var/lib/smart'])
+ execute_pre_post_process(self.d, rpm_post_process_cmds)
+
+ self._log_check()
+
if self.inc_rpm_image_gen == "1":
self.pm.backup_packaging_data()
@@ -615,6 +623,8 @@ class DpkgRootfs(DpkgOpkgRootfs):
def _create(self):
pkgs_to_install = self.manifest.parse_initial_manifest()
+ deb_pre_process_cmds = self.d.getVar('DEB_PREPROCESS_COMMANDS', True)
+ deb_post_process_cmds = self.d.getVar('DEB_POSTPROCESS_COMMANDS', True)
alt_dir = self.d.expand("${IMAGE_ROOTFS}/var/lib/dpkg/alternatives")
bb.utils.mkdirhier(alt_dir)
@@ -622,6 +632,8 @@ class DpkgRootfs(DpkgOpkgRootfs):
# update PM index files
self.pm.write_index()
+ execute_pre_post_process(self.d, deb_pre_process_cmds)
+
self.pm.update()
for pkg_type in self.install_order:
@@ -639,9 +651,11 @@ class DpkgRootfs(DpkgOpkgRootfs):
self.pm.run_pre_post_installs()
+ execute_pre_post_process(self.d, deb_post_process_cmds)
+
@staticmethod
def _depends_list():
- return ['DEPLOY_DIR_DEB', 'DEB_SDK_ARCH', 'APTCONF_TARGET', 'APT_ARGS', 'DPKG_ARCH', 'DEB_PREPROCESS_COMMANDS', 'DEB_POSTPROCESS_COMMAND']
+ return ['DEPLOY_DIR_DEB', 'DEB_SDK_ARCH', 'APTCONF_TARGET', 'APT_ARGS', 'DPKG_ARCH', 'DEB_PREPROCESS_COMMANDS', 'DEB_POSTPROCESS_COMMANDS']
def _get_delayed_postinsts(self):
status_file = self.image_rootfs + "/var/lib/dpkg/status"