repos: Avoid missing build requirements
Fixes the previous commit series.
This commit is contained in:
parent
36010b8fc7
commit
d15a93c39a
@ -387,12 +387,13 @@ def _raw_build_report(from_repo, to_repo, source_name, ignore=(), prefer=()):
|
||||
# find what's missing for the build chroot in to_repo
|
||||
chroot = to_repo.chroot_for(
|
||||
from_repo.sources[source_name].requires, prefer=prefer)
|
||||
|
||||
# distinguish unmets from build requirements that are missing
|
||||
buildreqs = {dep for dep in from_repo.sources[source_name].requires}
|
||||
missing_buildreqs = (
|
||||
((_BUILDREQ if dep in buildreqs else _BUILD_UNMET), dep)
|
||||
for dep in chroot.unmets())
|
||||
|
||||
missing_reqs = ((_BUILDREQ, dep) for dep in buildreqs
|
||||
if not chroot.is_provided(dep))
|
||||
chroot_unmets = ((_BUILD_UNMET, dep) for dep in chroot.unmets()
|
||||
if dep not in buildreqs)
|
||||
|
||||
# add requirements for the binary packages this source package
|
||||
# produces in the from_repo; if needed, try to translate from 64 to 32 bits
|
||||
@ -401,16 +402,13 @@ def _raw_build_report(from_repo, to_repo, source_name, ignore=(), prefer=()):
|
||||
for dep in b.requires)
|
||||
|
||||
result = set()
|
||||
for kind, dep in itertools.chain(missing_buildreqs, binreqs):
|
||||
for kind, dep in itertools.chain(missing_reqs, chroot_unmets, binreqs):
|
||||
# skip some platform-specific stuff
|
||||
if any(x in dep.name for x in _SPECIAL_DEPS):
|
||||
continue
|
||||
# skip dependencies already present in to_repo
|
||||
if any(to_repo.providers(dep)):
|
||||
continue
|
||||
# if the repository has an addon, it can cover BR
|
||||
if _is_build_kind(kind) and any(to_repo.addon_providers(dep)):
|
||||
continue
|
||||
# skip inter-sub-package dependencies
|
||||
if any(p.source_name == source_name
|
||||
for _d, p in from_repo.providers(dep)):
|
||||
|
Loading…
x
Reference in New Issue
Block a user