Patchwork [meta-oe,1/2] systemd.bbclass: stop using SYSTEMDPN to rdepends addition

login
register
mail settings
Submitter Otavio Salvador
Date Nov. 8, 2011, 12:58 p.m.
Message ID <db24be4e6f001aae20b76249c499becc26ca1821.1320757052.git.otavio@ossystems.com.br>
Download mbox | patch
Permalink /patch/14511/
State Accepted
Commit 051102329c49b50d336f304ac04a1f3ff6e8ec99
Headers show

Comments

Otavio Salvador - Nov. 8, 2011, 12:58 p.m.
The systemd runtime dependency needs to be add dynamically onto each
package that has the postinst generate thus removing the SYSTEMDPN use
et all.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
 meta-oe/classes/systemd.bbclass |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

Patch

diff --git a/meta-oe/classes/systemd.bbclass b/meta-oe/classes/systemd.bbclass
index 83833db..2ca7bfc 100644
--- a/meta-oe/classes/systemd.bbclass
+++ b/meta-oe/classes/systemd.bbclass
@@ -1,7 +1,4 @@ 
-SYSTEMDPN ?= "${PN}"
-
 DEPENDS_append = " systemd-systemctl-native"
-RDEPENDS_${SYSTEMDPN}_append = " systemd"
 
 systemd_postinst() {
 OPTS=""
@@ -67,9 +64,14 @@  python populate_packages_prepend () {
                 postrm += bb.data.getVar('systemd_postrm', localdata, 1)
 		bb.data.setVar('pkg_postrm_%s' % pkg, postrm, d)
 
+		rdepends = explode_deps(bb.data.getVar('RDEPENDS_' + pkg, d, 0) or bb.data.getVar('RDEPENDS', d, 0) or "")
+		rdepends.append("systemd")
+		bb.data.setVar('RDEPENDS_' + pkg, " " + " ".join(rdepends), d)
+
+
 	pkgs = bb.data.getVar('SYSTEMD_PACKAGES', d, 1)
 	if pkgs == None:
-		pkgs = bb.data.getVar('SYSTEMDPN', d, 1)
+		pkgs = bb.data.getVar('PN', d, 1)
 		packages = (bb.data.getVar('PACKAGES', d, 1) or "").split()
 		if not pkgs in packages and packages != []:
 			pkgs = packages[0]