| Summary: | rpm-postinsts not installed on sato images | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | Chen Qi <Qi.Chen> |
| Component: | core | Assignee: | Chen Qi <Qi.Chen> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | Medium+ | CC: | hongxu.jia, kai.kang, liezhi.yang, meta.mr.watcher, meta.watcher, ning.zhang, richard.purdie, sen.zhang, yi.zhao |
| Version: | 1.4 | ||
| Target Milestone: | 1.4 M6 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | --- | |
Below is patch to try to fix this problem. Any comment or suggestion is welcome.
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 9721a6b..468aaa0 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -21,7 +21,8 @@ IMAGE_FEATURES ?= ""
IMAGE_FEATURES[type] = "list"
# rootfs bootstrap install
-ROOTFS_BOOTSTRAP_INSTALL = "${@base_contains("IMAGE_FEATURES", "package-management", "", "${ROOTFS_PKGMANAGE_BOOTSTRAP}",d)}"
+# We use weak assignment to allow override.
+ROOTFS_BOOTSTRAP_INSTALL ?= "${@base_contains("IMAGE_FEATURES", "package-management", "", "${ROOTFS_PKGMANAGE_BOOTSTRAP}",d)}"
# packages to install from features
FEATURE_INSTALL = "${@' '.join(oe.packagegroup.required_packages(oe.data.typed_value('IMAGE_FEATURES', d), d))}"
diff --git a/meta/classes/rootfs_rpm.bbclass b/meta/classes/rootfs_rpm.bbclass
index d373dab..9a06a7d 100644
--- a/meta/classes/rootfs_rpm.bbclass
+++ b/meta/classes/rootfs_rpm.bbclass
@@ -4,6 +4,7 @@
ROOTFS_PKGMANAGE = "rpm smartpm"
ROOTFS_PKGMANAGE_BOOTSTRAP = "rpm-postinsts"
+ROOTFS_BOOTSTRAP_INSTALL = "${ROOTFS_PKGMANAGE_BOOTSTRAP}"
# Add 50Meg of extra space for Smart
IMAGE_ROOTFS_EXTRA_SPACE_append = "${@base_contains("PACKAGE_INSTALL", "smartpm", " + 51200", "" ,d)}"
//Chen Qi
|
rpm-postinsts is not installed on sato images. In fact, for now, rpm-postinsts will not be installed if 'package-management' is in IMAGE_FEATURES. meta/classes/image.bbclass:ROOTFS_BOOTSTRAP_INSTALL = "${@base_contains("IMAGE_FEATURES", "package-management", "", "${ROOTFS_PKGMANAGE_BOOTSTRAP}",d)}" (This means that if package manager is not installed, we fall back to a bootstrap method, which is 'run-postinst' in case of ipk and deb. But rpm is a little different. Running its postinst scripts doesn't require a package manager installed on target, as these scripts are just shell scripts.) meta/classes/image.bbclass:export PACKAGE_INSTALL ?= "${IMAGE_INSTALL} ${ROOTFS_BOOTSTRAP_INSTALL} ${FEATURE_INSTALL}" Anyway, rpm-postinsts should be installed no matter package-management is in IMAGE_FEATURES or not.