Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/2] make rpm-postinsts installed on target
@ 2013-04-02  3:31 Qi.Chen
  2013-04-02  3:31 ` [PATCH 1/2] image.bbclass: allow override for ROOTFS_BOOTSTRAP_INSTALL Qi.Chen
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Qi.Chen @ 2013-04-02  3:31 UTC (permalink / raw)
  To: openembedded-core; +Cc: qingtao.cao

From: Chen Qi <Qi.Chen@windriver.com>

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(-)

-- 
1.7.9.5




^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] image.bbclass: allow override for ROOTFS_BOOTSTRAP_INSTALL
  2013-04-02  3:31 [PATCH 0/2] make rpm-postinsts installed on target Qi.Chen
@ 2013-04-02  3:31 ` Qi.Chen
  2013-04-02 11:21   ` Richard Purdie
  2013-04-02  3:31 ` [PATCH 2/2] rootfs_rpm.bbclass: make rpm-postinsts installed on target Qi.Chen
  2013-04-02 17:02 ` [PATCH 0/2] " Richard Purdie
  2 siblings, 1 reply; 5+ messages in thread
From: Qi.Chen @ 2013-04-02  3:31 UTC (permalink / raw)
  To: openembedded-core; +Cc: qingtao.cao

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(-)

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))}"
-- 
1.7.9.5




^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] rootfs_rpm.bbclass: make rpm-postinsts installed on target
  2013-04-02  3:31 [PATCH 0/2] make rpm-postinsts installed on target Qi.Chen
  2013-04-02  3:31 ` [PATCH 1/2] image.bbclass: allow override for ROOTFS_BOOTSTRAP_INSTALL Qi.Chen
@ 2013-04-02  3:31 ` Qi.Chen
  2013-04-02 17:02 ` [PATCH 0/2] " Richard Purdie
  2 siblings, 0 replies; 5+ messages in thread
From: Qi.Chen @ 2013-04-02  3:31 UTC (permalink / raw)
  To: openembedded-core; +Cc: qingtao.cao

From: Chen Qi <Qi.Chen@windriver.com>

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

[YOCTO #4160]

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 meta/classes/rootfs_rpm.bbclass |    1 +
 1 file changed, 1 insertion(+)

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)}"
-- 
1.7.9.5




^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] image.bbclass: allow override for ROOTFS_BOOTSTRAP_INSTALL
  2013-04-02  3:31 ` [PATCH 1/2] image.bbclass: allow override for ROOTFS_BOOTSTRAP_INSTALL Qi.Chen
@ 2013-04-02 11:21   ` Richard Purdie
  0 siblings, 0 replies; 5+ messages in thread
From: Richard Purdie @ 2013-04-02 11:21 UTC (permalink / raw)
  To: Qi.Chen; +Cc: qingtao.cao, openembedded-core

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




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/2] make rpm-postinsts installed on target
  2013-04-02  3:31 [PATCH 0/2] make rpm-postinsts installed on target Qi.Chen
  2013-04-02  3:31 ` [PATCH 1/2] image.bbclass: allow override for ROOTFS_BOOTSTRAP_INSTALL Qi.Chen
  2013-04-02  3:31 ` [PATCH 2/2] rootfs_rpm.bbclass: make rpm-postinsts installed on target Qi.Chen
@ 2013-04-02 17:02 ` Richard Purdie
  2 siblings, 0 replies; 5+ messages in thread
From: Richard Purdie @ 2013-04-02 17:02 UTC (permalink / raw)
  To: Qi.Chen; +Cc: qingtao.cao, openembedded-core

On Tue, 2013-04-02 at 11:31 +0800, Qi.Chen@windriver.com wrote:
> From: Chen Qi <Qi.Chen@windriver.com>
> 
> 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

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




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-04-02 17:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-02  3:31 [PATCH 0/2] make rpm-postinsts installed on target Qi.Chen
2013-04-02  3:31 ` [PATCH 1/2] image.bbclass: allow override for ROOTFS_BOOTSTRAP_INSTALL Qi.Chen
2013-04-02 11:21   ` Richard Purdie
2013-04-02  3:31 ` [PATCH 2/2] rootfs_rpm.bbclass: make rpm-postinsts installed on target Qi.Chen
2013-04-02 17:02 ` [PATCH 0/2] " Richard Purdie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox