insane.bbclass: Improve the handling of runtime file dependencies

This makes the file-rdeps test support:
* versioned dependencies, e.g., "perl (>= 5.000)", and
* package dependencies among the file dependencies, e.g., "perl".

It also ignores all "perl(...)" dependencies since it is expected that
these are generated and handled by rpm itself and there is no reason
to second guess what it is doing.

(From OE-Core rev: 6d64b110ed0c22f2bcd10cde437a13e03c15b23e)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Peter Kjellerstedt 2017-08-29 23:21:02 +02:00 committed by Richard Purdie
parent 9d33b246ca
commit b539afa655
1 changed files with 10 additions and 6 deletions

View File

@ -912,8 +912,9 @@ def package_qa_check_rdepends(pkg, pkgdest, skip, taskdeps, packages, d):
rdep_data = oe.packagedata.read_subpkgdata(pkg, d)
for key in rdep_data:
if key.startswith("FILERDEPENDS_"):
for subkey in rdep_data[key].split():
if subkey not in ignored_file_rdeps:
for subkey in bb.utils.explode_deps(rdep_data[key]):
if subkey not in ignored_file_rdeps and \
not subkey.startswith('perl('):
# We already know it starts with FILERDEPENDS_
filerdepends[subkey] = key[13:]
@ -928,11 +929,10 @@ def package_qa_check_rdepends(pkg, pkgdest, skip, taskdeps, packages, d):
sub_rdeps = rdep_data.get("RDEPENDS_" + rdep)
if not sub_rdeps:
continue
for sub_rdep in sub_rdeps.split():
for sub_rdep in bb.utils.explode_deps(sub_rdeps):
if sub_rdep in done:
continue
if not sub_rdep.startswith('(') and \
oe.packagedata.has_subpkgdata(sub_rdep, d):
if oe.packagedata.has_subpkgdata(sub_rdep, d):
# It's a new rdep
done.append(sub_rdep)
new.append(sub_rdep)
@ -950,11 +950,15 @@ def package_qa_check_rdepends(pkg, pkgdest, skip, taskdeps, packages, d):
filerdepends.pop("/usr/bin/python",None)
done.remove(py)
for rdep in done:
# The file dependencies may contain package names, e.g.,
# perl
filerdepends.pop(rdep,None)
# For Saving the FILERPROVIDES, RPROVIDES and FILES_INFO
rdep_data = oe.packagedata.read_subpkgdata(rdep, d)
for key in rdep_data:
if key.startswith("FILERPROVIDES_") or key.startswith("RPROVIDES_"):
for subkey in rdep_data[key].split():
for subkey in bb.utils.explode_deps(rdep_data[key]):
filerdepends.pop(subkey,None)
# Add the files list to the rprovides
if key == "FILES_INFO":