Skip to contentSkip to conversation

package.bbclass: explode the RPROVIDES so we don't think the versions are provides

PATCH Superseded Ross Burton 1 participant 1 message Aug 27, 2020

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package.bbclass: explode the RPROVIDES so we don't think the versions are provides

From: Ross Burton <[email protected]>

emit_pkgdata() creates symlinks for each of the RPROVIDES in pkgdata/MACHINE/runtime-rprovides. However this string can contain versions which results in directories called (=2.32), so pass the RPROVIDES string through bb.utils.explode_deps() to strip the versions out.

Also use os.path.join() instead of string glueing.

Helps mitigate - but not solve - #13999.

---
 meta/classes/package.bbclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta/classes/package.bbclass +2 -2
index 7a36262eb6..9ce1a29eec 100644
@@ -1638,8 +1638,8 @@ fi
         # Symlinks needed for rprovides lookup
         rprov = d.getVar('RPROVIDES_%s' % pkg) or d.getVar('RPROVIDES')
         if rprov:
-            for p in rprov.strip().split():
-                subdata_sym = pkgdatadir + "/runtime-rprovides/%s/%s" % (p, pkg)
+            for p in bb.utils.explode_deps(rprov):
+                subdata_sym = os.path.join(pkgdatadir, "runtime-rprovides", p, pkg)
                 bb.utils.mkdirhier(os.path.dirname(subdata_sym))
                 oe.path.symlink("../../runtime/%s" % pkg, subdata_sym, True)
 
Signature · 1 line
2.28.0