summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2018-05-16 11:13:52 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-06-18 11:07:58 +0100
commit261ee1896804e6261443d1dfe7dedb6546644d3a (patch)
tree4a2d7512c19a79b4225e93ef52f65f025195e351 /meta
parenta7d0346825a04bb05dd1b110d825afb2e12af84a (diff)
downloadpoky-261ee1896804e6261443d1dfe7dedb6546644d3a.tar.gz
rootfs.py: for dpkg/opkg, don't install postinsts if package management is present
If package management is present opkg/dpkg will bring the original copy of the postinsts scripts with the metadata and will be able to handle postinsts just fine. In fact, it is preferred to let package management handle the postinsts scripts in this case since it will keep the package managers database up-to-date too. The run-postinsts scripts will make sure the package manager gets invoked instead of the scripts directly. Note: Before commit 5aae19959a44 ("rootfs.py: Change logic to unistall packages") rootfs.py did not install /etc/$pm-postinsts too. It is not clear whether that change was intentionally or just a bug. This commit fixes/reverts that aspect of the commit. (From OE-Core rev: 4b571c59e3e6bd8b22a63f547a95757aeba5b638) Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/lib/oe/rootfs.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py
index c51e76ddfc..28642abbd9 100644
--- a/meta/lib/oe/rootfs.py
+++ b/meta/lib/oe/rootfs.py
@@ -561,6 +561,9 @@ class DpkgOpkgRootfs(Rootfs):
561 return pkg_list 561 return pkg_list
562 562
563 def _save_postinsts_common(self, dst_postinst_dir, src_postinst_dir): 563 def _save_postinsts_common(self, dst_postinst_dir, src_postinst_dir):
564 if bb.utils.contains("IMAGE_FEATURES", "package-management",
565 True, False, self.d):
566 return
564 num = 0 567 num = 0
565 for p in self._get_delayed_postinsts(): 568 for p in self._get_delayed_postinsts():
566 bb.utils.mkdirhier(dst_postinst_dir) 569 bb.utils.mkdirhier(dst_postinst_dir)