summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-01-29 14:02:56 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-02-01 15:54:02 +0000
commited931d0314e4d1bb5230b266d2ec6d55dcb63df6 (patch)
treef8061497d3f9e76cb9bdf414e4d5497135e7d5d7
parent398d62fd74b87d5f9c655a86f5c163da89188cb5 (diff)
downloadpoky-ed931d0314e4d1bb5230b266d2ec6d55dcb63df6.tar.gz
package.bbclass: Improve package_fixsymlinks
Improve package_fixsymlinks so we don't handle RDEPENDS for every single package in PACKAGES. (From OE-Core rev: 20ff8feb95d54e4db646f8c0cb006ce187e288af) (From OE-Core rev: ca2ee871f82dd0ba4122a8373e4efd21cec5722b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/package.bbclass19
1 files changed, 12 insertions, 7 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 2f1695b646..1ccac9cdb8 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -1064,24 +1064,29 @@ python package_fixsymlinks () {
1064 target = os.path.join(root[len(inst_root):], target) 1064 target = os.path.join(root[len(inst_root):], target)
1065 dangling_links[pkg].append(os.path.normpath(target)) 1065 dangling_links[pkg].append(os.path.normpath(target))
1066 1066
1067 for pkg in packages: 1067 newrdepends = {}
1068 rdepends = bb.utils.explode_dep_versions2(d.getVar('RDEPENDS_' + pkg, True) or d.getVar('RDEPENDS', True) or "") 1068 for pkg in dangling_links:
1069
1070 for l in dangling_links[pkg]: 1069 for l in dangling_links[pkg]:
1071 found = False 1070 found = False
1072 bb.debug(1, "%s contains dangling link %s" % (pkg, l)) 1071 bb.debug(1, "%s contains dangling link %s" % (pkg, l))
1073 for p in packages: 1072 for p in packages:
1074 for f in pkg_files[p]: 1073 if l in pkg_files[p]:
1075 if f == l:
1076 found = True 1074 found = True
1077 bb.debug(1, "target found in %s" % p) 1075 bb.debug(1, "target found in %s" % p)
1078 if p == pkg: 1076 if p == pkg:
1079 break 1077 break
1080 if p not in rdepends: 1078 if pkg not in newrdepends:
1081 rdepends[p] = [] 1079 newrdepends[pkg] = []
1080 newrdepends[pkg].append(p)
1082 break 1081 break
1083 if found == False: 1082 if found == False:
1084 bb.note("%s contains dangling symlink to %s" % (pkg, l)) 1083 bb.note("%s contains dangling symlink to %s" % (pkg, l))
1084
1085 for pkg in newrdepends:
1086 rdepends = bb.utils.explode_dep_versions2(d.getVar('RDEPENDS_' + pkg, True) or d.getVar('RDEPENDS', True) or "")
1087 for p in newrdepends[pkg]:
1088 if p not in rdepends:
1089 rdepends[p] = []
1085 d.setVar('RDEPENDS_' + pkg, bb.utils.join_deps(rdepends, commasep=False)) 1090 d.setVar('RDEPENDS_' + pkg, bb.utils.join_deps(rdepends, commasep=False))
1086} 1091}
1087 1092