summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2015-07-27 20:10:50 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-08-01 11:00:02 +0100
commitaadfac366bd2cae37357e15bf4fc28c159d71b32 (patch)
tree9ac0f029c84baed22983d9510bb95e0c60937158
parent05d18a1d2630fbe81d8218c3722481d31bf0892f (diff)
downloadopenembedded-core-contrib-aadfac366bd2cae37357e15bf4fc28c159d71b32.tar.gz
openembedded-core-contrib-aadfac366bd2cae37357e15bf4fc28c159d71b32.tar.bz2
openembedded-core-contrib-aadfac366bd2cae37357e15bf4fc28c159d71b32.zip
rootfs.py: fix PRE/POSTPROCESS_COMMANDS for rpm and deb
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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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"