Skip to contentSkip to conversation

package(_ipk).bbclass: fix versioned dependencies in RDEPENDS et al.

PATCH In review Andreas Oberritter 1 participant 2 messages Jan 27, 2011 – Jan 28, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package(_ipk).bbclass: fix versioned dependencies in RDEPENDS et al.

* explode_deps() changed its behavior to omit version information when the function was removed from OE in favor of BitBake's implementation in March 2010. Since then, packages didn't contain versioned runtime dependencies.

See commit 89b7e433719f43f1c36c76cb8856d559014e99bc

The solution is to switch to bb.utils.explode_dep_versions(), as already used by package_rpm.bbclass.

* Two functions in package.bbclass needlessly added whitespace characters to RDEPENDS_*. This was removed.

* The following statement was removed from package_ipk.bbclass:

if not '-locale-' and not '-dbg' and not '-dev' in pkgname:
rdepends.append('%s-locale*' % pkgname)

It was added in November 2008, but can never evaluate to true.

See commit a045dfacf6f2541e0f410d9d109581f181303756

CC Chris Larson <[email protected]>
CC Otavio Salvador <[email protected]>
---
 classes/package.bbclass     |   15 ++++++++-------
 classes/package_ipk.bbclass |   41 +++++++++++++++++++----------------------
 2 files changed, 27 insertions(+), 29 deletions(-)
classes/package.bbclass +8 -7
index 678ffa9..1ea3b72 100644
@@ -292,12 +292,13 @@ def runtime_mapping_rename (varname, d):
 	#bb.note("%s before: %s" % (varname, bb.data.getVar(varname, d, True)))	
 
 	new_depends = []
-	for depend in explode_deps(bb.data.getVar(varname, d, True) or ""):
+	depends = bb.utils.explode_dep_versions(bb.data.getVar(varname, d, True) or "")
+	for dep in depends:
 		# Have to be careful with any version component of the depend
-		split_depend = depend.split(' (')
-		new_depend = get_package_mapping(split_depend[0].strip(), d)
-		if len(split_depend) > 1:
-			new_depends.append("%s (%s" % (new_depend, split_depend[1]))
+		ver = depends[dep]
+		new_depend = get_package_mapping(dep, d)
+		if ver:
+			new_depends.append("%s (%s)" % (new_depend, ver))
 		else:
 			new_depends.append(new_depend)
 
@@ -517,7 +518,7 @@ python populate_packages () {
 						break
 			if found == False:
 				bb.note("%s contains dangling symlink to %s" % (pkg, l))
-		bb.data.setVar('RDEPENDS_' + pkg, " " + " ".join(rdepends), d)
+		bb.data.setVar('RDEPENDS_' + pkg, " ".join(rdepends), d)
 }
 populate_packages[dirs] = "${D}"
 
@@ -897,7 +898,7 @@ python read_shlibdeps () {
 				fd.close()
 				for l in lines:
 					rdepends.append(l.rstrip())
-		bb.data.setVar('RDEPENDS_' + pkg, " " + " ".join(rdepends), d)
+		bb.data.setVar('RDEPENDS_' + pkg, " ".join(rdepends), d)
 }
 
 python package_depchains() {
classes/package_ipk.bbclass +19 -22

47 lines not on this page · raw message

Signature · 1 line
1.7.2.3
#1 lore raw
Quoted 18 lines · Andreas Oberritter

* explode_deps() changed its behavior to omit version information when the function was removed from OE in favor of BitBake's implementation in March 2010. Since then, packages didn't contain versioned runtime dependencies.

See commit 89b7e433719f43f1c36c76cb8856d559014e99bc

The solution is to switch to bb.utils.explode_dep_versions(), as already used by package_rpm.bbclass.

* Two functions in package.bbclass needlessly added whitespace characters to RDEPENDS_*. This was removed.

* The following statement was removed from package_ipk.bbclass:

if not '-locale-' and not '-dbg' and not '-dev' in pkgname:
rdepends.append('%s-locale*' % pkgname)

Quoted 7 lines

It was added in November 2008, but can never evaluate to true.

See commit a045dfacf6f2541e0f410d9d109581f181303756

CC Chris Larson <[email protected]>
CC Otavio Salvador <[email protected]>

Although this patch fixes the runtime dependencies for shlibs generated versions, it doesn't cover versions specified in recipes. I'm going to post an updated patch.

Regards,
Andreas