summaryrefslogtreecommitdiffstats
path: root/meta/classes/package.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2014-07-09 21:18:04 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-07-10 17:38:32 +0100
commite35d6269bad98b0311e1818991ca64e846c2df8d (patch)
treee1de15de22f8863bf8cedce91952f7b5ed060b47 /meta/classes/package.bbclass
parent09898d607423a8feb7810d262796819d24300491 (diff)
downloadpoky-e35d6269bad98b0311e1818991ca64e846c2df8d.tar.gz
package.bbclass: Generate runtime-rprovides data
Currently, given a list of rdepends its near impossible to figure out which ones are potentially invalid and which might be an RPROVIDES of a package. This problem is simple to solve, we can write lookup data into the pkgdata. This patch does that, accounting for the fact that multiple packages can RPROVIDE the same thing (particularly with locales). Its done with symlinks so the performance overhead is minimal. (From OE-Core rev: 30b4bff944c4625696e9be97ce4912a2710d13e9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/package.bbclass')
-rw-r--r--meta/classes/package.bbclass15
1 files changed, 11 insertions, 4 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 988e148893..735837667f 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -1134,11 +1134,11 @@ python emit_pkgdata() {
1134 val = d.getVar('%s_%s' % (var, pkg), True) 1134 val = d.getVar('%s_%s' % (var, pkg), True)
1135 if val: 1135 if val:
1136 f.write('%s_%s: %s\n' % (var, pkg, encode(val))) 1136 f.write('%s_%s: %s\n' % (var, pkg, encode(val)))
1137 return 1137 return val
1138 val = d.getVar('%s' % (var), True) 1138 val = d.getVar('%s' % (var), True)
1139 if val: 1139 if val:
1140 f.write('%s: %s\n' % (var, encode(val))) 1140 f.write('%s: %s\n' % (var, encode(val)))
1141 return 1141 return val
1142 1142
1143 def write_extra_pkgs(variants, pn, packages, pkgdatadir): 1143 def write_extra_pkgs(variants, pn, packages, pkgdatadir):
1144 for variant in variants: 1144 for variant in variants:
@@ -1207,7 +1207,7 @@ python emit_pkgdata() {
1207 write_if_exists(sf, pkg, 'DESCRIPTION') 1207 write_if_exists(sf, pkg, 'DESCRIPTION')
1208 write_if_exists(sf, pkg, 'SUMMARY') 1208 write_if_exists(sf, pkg, 'SUMMARY')
1209 write_if_exists(sf, pkg, 'RDEPENDS') 1209 write_if_exists(sf, pkg, 'RDEPENDS')
1210 write_if_exists(sf, pkg, 'RPROVIDES') 1210 rprov = write_if_exists(sf, pkg, 'RPROVIDES')
1211 write_if_exists(sf, pkg, 'RRECOMMENDS') 1211 write_if_exists(sf, pkg, 'RRECOMMENDS')
1212 write_if_exists(sf, pkg, 'RSUGGESTS') 1212 write_if_exists(sf, pkg, 'RSUGGESTS')
1213 write_if_exists(sf, pkg, 'RREPLACES') 1213 write_if_exists(sf, pkg, 'RREPLACES')
@@ -1235,6 +1235,13 @@ python emit_pkgdata() {
1235 # Symlinks needed for reverse lookups (from the final package name) 1235 # Symlinks needed for reverse lookups (from the final package name)
1236 subdata_sym = pkgdatadir + "/runtime-reverse/%s" % pkgval 1236 subdata_sym = pkgdatadir + "/runtime-reverse/%s" % pkgval
1237 oe.path.symlink("../runtime/%s" % pkg, subdata_sym, True) 1237 oe.path.symlink("../runtime/%s" % pkg, subdata_sym, True)
1238
1239 # Symlinks needed for rprovides lookup
1240 if rprov:
1241 for p in rprov.strip().split():
1242 subdata_sym = pkgdatadir + "/runtime-rprovides/%s/%s" % (p, pkg)
1243 bb.utils.mkdirhier(os.path.dirname(subdata_sym))
1244 oe.path.symlink("../../runtime/%s" % pkg, subdata_sym, True)
1238 1245
1239 allow_empty = d.getVar('ALLOW_EMPTY_%s' % pkg, True) 1246 allow_empty = d.getVar('ALLOW_EMPTY_%s' % pkg, True)
1240 if not allow_empty: 1247 if not allow_empty:
@@ -1254,7 +1261,7 @@ python emit_pkgdata() {
1254 1261
1255 bb.utils.unlockfile(lf) 1262 bb.utils.unlockfile(lf)
1256} 1263}
1257emit_pkgdata[dirs] = "${PKGDESTWORK}/runtime ${PKGDESTWORK}/runtime-reverse" 1264emit_pkgdata[dirs] = "${PKGDESTWORK}/runtime ${PKGDESTWORK}/runtime-reverse ${PKGDESTWORK}/runtime-rprovides"
1258 1265
1259ldconfig_postinst_fragment() { 1266ldconfig_postinst_fragment() {
1260if [ x"$D" = "x" ]; then 1267if [ x"$D" = "x" ]; then