rootfs.py: fix PRE/POSTPROCESS_COMMANDS for rpm and deb
cover rootfs.py: fix PRE/POSTPROCESS_COMMANDS for rpm and deb
Hello,
This patch fixes RPM_PREPROCESS_COMMANDS and RPM_POSTPROCESS_COMMANDS (the similar to deb).
Btw., there is another ROOTFS_POSTINSTALL_COMMAND, only the ipk's install runs it atm, what's the difference between ROOTFS_POSTINSTALL_COMMAND and ROOTFS_POSTPROCESS_COMMAND? Do we need rpm and deb run it, please ?
// Robert
The following changes since commit e72aac2ae9e5fce1715fa04b7e94034fd06892d9:
alsa-lib: libasound should runtime depends on alsa-conf (2014-09-03 11:30:11 +0100)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib rbt/post
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=rbt/post
Robert Yang (1):
rootfs.py: fix PRE/POSTPROCESS_COMMANDS for rpm and deb
meta/lib/oe/rootfs.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)
Signature · 1 line
1.7.9.5
PATCH 1/1 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
--- meta/lib/oe/rootfs.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)
meta/lib/oe/rootfs.py +13 -1
@@ -295,10 +295,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":
@@ -320,6 +324,8 @@ class RpmRootfs(Rootfs): self.pm.install_complementary() + execute_pre_post_process(self.d, rpm_post_process_cmds) + self._log_check() if self.inc_rpm_image_gen == "1":
@@ -401,6 +407,8 @@ class DpkgRootfs(Rootfs): 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)
@@ -408,6 +416,8 @@ class DpkgRootfs(Rootfs): # 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:
@@ -423,9 +433,11 @@ class DpkgRootfs(Rootfs): 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): pkg_list = []
Signature · 1 line
1.7.9.5
Ping, I think that we need it since it is a function lost.
// Robert
Quoted 71 lines · Robert Yang
The rpm didn't run
RPM_PREPROCESS_COMMANDSorRPM_POSTPROCESS_COMMANDS, the similar to deb, this patch fix the problem.And fix a typo:
DEB_POSTPROCESS_COMMAND->DEB_POSTPROCESS_COMMANDSSigned-off-by Robert Yang <[email protected]>--- meta/lib/oe/rootfs.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)meta/lib/oe/rootfs.py +13
-1@@ -295,10 +295,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":@@ -320,6 +324,8 @@ class RpmRootfs(Rootfs): self.pm.install_complementary() + execute_pre_post_process(self.d, rpm_post_process_cmds) + self._log_check() if self.inc_rpm_image_gen == "1":@@ -401,6 +407,8 @@ class DpkgRootfs(Rootfs): 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)@@ -408,6 +416,8 @@ class DpkgRootfs(Rootfs): # 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:@@ -423,9 +433,11 @@ class DpkgRootfs(Rootfs): 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): pkg_list = []
Quoted 1 line · Robert Yang
Ping, I think that we need it since it is a function lost.
If we're going to unify the behaviour - which is a good thing - then ROOTFS_POSTPROCESS_COMMAND needs to be unified too.
Ross
Quoted 5 lines · Ross
Quoted 1 line · Robert Yang
Ping, I think that we need it since it is a function lost.
If we're going to unify the behaviour - which is a good thing - then
ROOTFS_POSTPROCESS_COMMANDneeds to be unified too.
The ROOTFS_POSTPROCESS_COMMAND works well, there isn't anything wrong with it, did you mean the ROOTFS_POSTINSTALL_COMMAND ? I don't know the difference between ROOTFS_POSTINSTALL_COMMAND and ROOTFS_POSTPROCESS_COMMAND, maybe we need remove ROOTFS_POSTINSTALL_COMMAND ?
// Robert
Quoted 4 lines
Ross
Quoted 6 lines · Robert Yang
Quoted 3 lines · Ross
Quoted 1 line · Robert Yang
Ping, I think that we need it since it is a function lost.
Quoted 8 lines
Quoted 2 lines
If we're going to unify the behaviour - which is a good thing - then
ROOTFS_POSTPROCESS_COMMANDneeds to be unified too.The
ROOTFS_POSTPROCESS_COMMANDworks well, there isn't anything wrong with it, did you mean theROOTFS_POSTINSTALL_COMMAND? I don't know the difference betweenROOTFS_POSTINSTALL_COMMANDandROOTFS_POSTPROCESS_COMMAND, maybe we need removeROOTFS_POSTINSTALL_COMMAND?
Hi Ross,
Any comments on this, please ?
// Robert
Quoted 6 lines
// Robert
Quoted 4 lines
Ross
Quoted 2 lines · Robert Yang
The rpm didn't run
RPM_PREPROCESS_COMMANDSorRPM_POSTPROCESS_COMMANDS, the similar to deb, this patch fix the problem.
I'm not sure I understand this... The pre/post process commands are run in the abstract class Rootfs create() method, which is inherited by all backends. The create_rootfs() function calls the create() method for each backend. So, these have to execute. Unless, there is something else going on, which has to be properly fixed.
Quoted 3 lines
And fix a typo:
DEB_POSTPROCESS_COMMAND->DEB_POSTPROCESS_COMMANDS
this change is ok.
Quoted 73 lines
Signed-off-by Robert Yang <[email protected]>--- meta/lib/oe/rootfs.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)meta/lib/oe/rootfs.py +13
-1@@ -295,10 +295,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":@@ -320,6 +324,8 @@ class RpmRootfs(Rootfs): self.pm.install_complementary() + execute_pre_post_process(self.d, rpm_post_process_cmds) + self._log_check() if self.inc_rpm_image_gen == "1":@@ -401,6 +407,8 @@ class DpkgRootfs(Rootfs): 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)@@ -408,6 +416,8 @@ class DpkgRootfs(Rootfs): # 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:@@ -423,9 +433,11 @@ class DpkgRootfs(Rootfs): 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): pkg_list = []Signature · 7 lines
1.7.9.5 -- _______________________________________________ Openembedded-core mailing list [email protected] http://lists.openembedded.org/mailman/listinfo/openembedded-core
My bad... I saw it now... It's about backend specific pre/post commands.
Sorry for the noise.
laurentiu
Quoted 92 lines · Laurentiu Palcu
Quoted 2 lines · Robert Yang
The rpm didn't run
RPM_PREPROCESS_COMMANDSorRPM_POSTPROCESS_COMMANDS, the similar to deb, this patch fix the problem.I'm not sure I understand this... The pre/post process commands are run in the abstract class Rootfs
create()method, which is inherited by all backends. Thecreate_rootfs()function calls thecreate()method for each backend. So, these have to execute. Unless, there is something else going on, which has to be properly fixed.Quoted 3 lines
And fix a typo:
DEB_POSTPROCESS_COMMAND->DEB_POSTPROCESS_COMMANDSthis change is ok.
Quoted 73 lines
Signed-off-by Robert Yang <[email protected]>--- meta/lib/oe/rootfs.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)meta/lib/oe/rootfs.py +13
-1@@ -295,10 +295,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":@@ -320,6 +324,8 @@ class RpmRootfs(Rootfs): self.pm.install_complementary() + execute_pre_post_process(self.d, rpm_post_process_cmds) + self._log_check() if self.inc_rpm_image_gen == "1":@@ -401,6 +407,8 @@ class DpkgRootfs(Rootfs): 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)@@ -408,6 +416,8 @@ class DpkgRootfs(Rootfs): # 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:@@ -423,9 +433,11 @@ class DpkgRootfs(Rootfs): 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): pkg_list = []Signature · 7 lines
1.7.9.5 -- _______________________________________________ Openembedded-core mailing list [email protected] http://lists.openembedded.org/mailman/listinfo/openembedded-coreSignature · 4 lines
_______________________________________________ Openembedded-core mailing list [email protected] http://lists.openembedded.org/mailman/listinfo/openembedded-core