Patchwork [1/2] image.bbclass: allow override for ROOTFS_BOOTSTRAP_INSTALL

login
register
mail settings
Submitter Qi.Chen@windriver.com
Date April 2, 2013, 3:31 a.m.
Message ID <40756f91f56034eef88d0338fb8975ca31db9213.1364872107.git.Qi.Chen@windriver.com>
Download mbox | patch
Permalink /patch/47251/
State New
Headers show

Comments

Qi.Chen@windriver.com - April 2, 2013, 3:31 a.m.
From: Chen Qi <Qi.Chen@windriver.com>

Previously, if 'package-management' is in IMAGE_FEATURES, this variable
is set to "", otherwise, it's ${ROOTFS_PKGMANAGE_BOOTSTRAP}. It works fine
with deb and ipk, because their postinsts rely on their package managers.
However, rpm is a little different, as its postinsts are just shell scripts.

We should allow rootfs_rpm.bbclass to override this variable, otherwise,
rpm-postinsts will not be installed on target if 'package-management' is
in IMAGE_FEATURES.

[YOCTO #4160]

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 meta/classes/image.bbclass |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Richard Purdie - April 2, 2013, 11:21 a.m.
On Tue, 2013-04-02 at 11:31 +0800, Qi.Chen@windriver.com wrote:
> From: Chen Qi <Qi.Chen@windriver.com>
> 
> Previously, if 'package-management' is in IMAGE_FEATURES, this variable
> is set to "", otherwise, it's ${ROOTFS_PKGMANAGE_BOOTSTRAP}. It works fine
> with deb and ipk, because their postinsts rely on their package managers.
> However, rpm is a little different, as its postinsts are just shell scripts.

Why don't we just make the rpm package RDEPEND on the postinst scripts
package like opkg and dpkg do?

I can't think of any case where that dependency would be an issue...

Cheers,

Richard

Patch

diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 9721a6b..fb7b64e 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -21,7 +21,7 @@  IMAGE_FEATURES ?= ""
 IMAGE_FEATURES[type] = "list"
 
 # rootfs bootstrap install
-ROOTFS_BOOTSTRAP_INSTALL = "${@base_contains("IMAGE_FEATURES", "package-management", "", "${ROOTFS_PKGMANAGE_BOOTSTRAP}",d)}"
+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))}"