Patchwork gconf.bbclass: Add proper RDEPENDS to packages with gconf postinststep.

login
register
mail settings
Submitter Koen Kooi
Date Feb. 1, 2012, 7:32 a.m.
Message ID <1328081524-29957-1-git-send-email-koen@dominion.thruhere.net>
Download mbox | patch
Permalink /patch/20471/
State Accepted
Commit 31997ae9188302f276241266590a1ae0f4316c3f
Headers show

Comments

Koen Kooi - Feb. 1, 2012, 7:32 a.m.
From: Peter Tworek <tworaz666@gmail.com>

Right now gconf bbclass adds both postinst and prerm steps, but it does
not ensure that packages involved have gconf in RDEPENDS. This can lead
to a situation where postinst/prerm steps fail because gconftool-2 is
not installed.

Signed-off-by: Peter Tworek <tworaz666@gmail.com>
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
---
 meta/classes/gconf.bbclass |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
Richard Purdie - Feb. 2, 2012, 6:31 p.m.
On Wed, 2012-02-01 at 08:32 +0100, Koen Kooi wrote:
> From: Peter Tworek <tworaz666@gmail.com>
> 
> Right now gconf bbclass adds both postinst and prerm steps, but it does
> not ensure that packages involved have gconf in RDEPENDS. This can lead
> to a situation where postinst/prerm steps fail because gconftool-2 is
> not installed.
> 
> Signed-off-by: Peter Tworek <tworaz666@gmail.com>
> Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
> ---
>  meta/classes/gconf.bbclass |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)

Merged to master, thanks.

Richard

Patch

diff --git a/meta/classes/gconf.bbclass b/meta/classes/gconf.bbclass
index c1dbbe3..7bfa871 100644
--- a/meta/classes/gconf.bbclass
+++ b/meta/classes/gconf.bbclass
@@ -56,5 +56,8 @@  python populate_packages_append () {
 				prerm = '#!/bin/sh\n'
 			prerm += d.getVar('gconf_prerm', 1)
 			d.setVar('pkg_prerm_%s' % pkg, prerm)
+			rdepends = d.getVar("RDEPENDS_%s" % pkg, True) or ""
+			rdepends += " gconf"
+			d.setVar("RDEPENDS_%s" % pkg, rdepends)
 
 }