mirror of
https://git.yoctoproject.org/poky
synced 2026-05-31 00:39:46 +00:00
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>
This commit is contained in:
@@ -1064,24 +1064,29 @@ python package_fixsymlinks () {
|
|||||||
target = os.path.join(root[len(inst_root):], target)
|
target = os.path.join(root[len(inst_root):], target)
|
||||||
dangling_links[pkg].append(os.path.normpath(target))
|
dangling_links[pkg].append(os.path.normpath(target))
|
||||||
|
|
||||||
for pkg in packages:
|
newrdepends = {}
|
||||||
rdepends = bb.utils.explode_dep_versions2(d.getVar('RDEPENDS_' + pkg, True) or d.getVar('RDEPENDS', True) or "")
|
for pkg in dangling_links:
|
||||||
|
|
||||||
for l in dangling_links[pkg]:
|
for l in dangling_links[pkg]:
|
||||||
found = False
|
found = False
|
||||||
bb.debug(1, "%s contains dangling link %s" % (pkg, l))
|
bb.debug(1, "%s contains dangling link %s" % (pkg, l))
|
||||||
for p in packages:
|
for p in packages:
|
||||||
for f in pkg_files[p]:
|
if l in pkg_files[p]:
|
||||||
if f == l:
|
|
||||||
found = True
|
found = True
|
||||||
bb.debug(1, "target found in %s" % p)
|
bb.debug(1, "target found in %s" % p)
|
||||||
if p == pkg:
|
if p == pkg:
|
||||||
break
|
break
|
||||||
if p not in rdepends:
|
if pkg not in newrdepends:
|
||||||
rdepends[p] = []
|
newrdepends[pkg] = []
|
||||||
|
newrdepends[pkg].append(p)
|
||||||
break
|
break
|
||||||
if found == False:
|
if found == False:
|
||||||
bb.note("%s contains dangling symlink to %s" % (pkg, l))
|
bb.note("%s contains dangling symlink to %s" % (pkg, l))
|
||||||
|
|
||||||
|
for pkg in newrdepends:
|
||||||
|
rdepends = bb.utils.explode_dep_versions2(d.getVar('RDEPENDS_' + pkg, True) or d.getVar('RDEPENDS', True) or "")
|
||||||
|
for p in newrdepends[pkg]:
|
||||||
|
if p not in rdepends:
|
||||||
|
rdepends[p] = []
|
||||||
d.setVar('RDEPENDS_' + pkg, bb.utils.join_deps(rdepends, commasep=False))
|
d.setVar('RDEPENDS_' + pkg, bb.utils.join_deps(rdepends, commasep=False))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user