Skip to contentSkip to conversation

make rpm-postinsts installed on target

PATCH In review [email protected] 2 participants 5 messages Apr 2, 2013

lore
Share & tools
lore
#0 lore raw

cover make rpm-postinsts installed on target

From: Chen Qi <[email protected]>

The following changes since commit 92aeb31341b28b193d616ab5cf38af1b9673e37d:

qemuimage-testlib: Fix quoting issue (2013-03-30 17:26:56 +0000)

are available in the git repository at:

git://git.pokylinux.org/poky-contrib ChenQi/rpm-postinsts-problem
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=ChenQi/rpm-postinsts-problem

Chen Qi (2):
image.bbclass: allow override for ROOTFS_BOOTSTRAP_INSTALL rootfs_rpm.bbclass: make rpm-postinsts installed on target

 meta/classes/image.bbclass      |    2 +-
 meta/classes/rootfs_rpm.bbclass |    1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/2 image.bbclass: allow override for ROOTFS_BOOTSTRAP_INSTALL

From: Chen Qi <[email protected]>

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]

---
 meta/classes/image.bbclass |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/image.bbclass +1 -1
index 9721a6b..fb7b64e 100644
@@ -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))}"
Signature · 1 line
1.7.9.5
#3 lore raw

PATCH 2/2 rootfs_rpm.bbclass: make rpm-postinsts installed on target

In reply to [email protected]

From: Chen Qi <[email protected]>

Override ROOTFS_BOOTSTAP_INSTALL to make rpm-postinsts installed on target regardless of 'package-management' image feature.

[YOCTO #4160]

---
 meta/classes/rootfs_rpm.bbclass |    1 +
 1 file changed, 1 insertion(+)
meta/classes/rootfs_rpm.bbclass +1 -0
index d373dab..9a06a7d 100644
@@ -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)}"
Signature · 1 line
1.7.9.5
#2 lore raw

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

In reply to [email protected]
Quoted 6 lines · On Tue, 2013-04-02 at 11:31 +0800, [email protected] wrote:

From: Chen Qi <[email protected]>

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

#4 lore raw
In reply to [email protected]
Quoted 6 lines · On Tue, 2013-04-02 at 11:31 +0800, [email protected] wrote:

From: Chen Qi <[email protected]>

The following changes since commit 92aeb31341b28b193d616ab5cf38af1b9673e37d:

qemuimage-testlib: Fix quoting issue (2013-03-30 17:26:56 +0000)

Quoted 8 lines

are available in the git repository at:

git://git.pokylinux.org/poky-contrib ChenQi/rpm-postinsts-problem
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=ChenQi/rpm-postinsts-problem

Chen Qi (2):
image.bbclass: allow override for ROOTFS_BOOTSTRAP_INSTALL rootfs_rpm.bbclass: make rpm-postinsts installed on target

This issue was causing problems elsewhere so I've merged a fix for it as I described (adding the right dependency to rpm).

Cheers,

Richard