forked from Mirror/pmbootstrap
repo_missing: don't check arch recursively (!1820)
Remove the recursive check, as it caused an infinite loop. It took a
very long time to complete anyway, even when it worked. The reasoning
for having the recursive check in the first place was, that we would
have device packages with arch=noarch set in the APKBUILD, but which
could only be built for a certain architecture (the device
architecture). Nowadays using arch=noarch in device packages is
forbidden, and we enforce that rule [1]. So the recursive arch check
isn't necessary anymore.
[1] ac6c0a2997
This commit is contained in:
parent
80a7fe8aaf
commit
925c56febe
4 changed files with 13 additions and 66 deletions
|
@ -25,7 +25,6 @@ Functions that work on both pmaports and (binary package) repos. See also:
|
|||
- pmb/helpers/repo.py (work on binary package repos)
|
||||
"""
|
||||
|
||||
import logging
|
||||
import copy
|
||||
|
||||
import pmb.helpers.pmaports
|
||||
|
@ -171,21 +170,3 @@ def check_arch(args, pkgname, arch, binary=True):
|
|||
else:
|
||||
arches = pmb.helpers.pmaports.get(args, pkgname)["arch"]
|
||||
return pmb.helpers.pmaports.check_arches(arches, arch)
|
||||
|
||||
|
||||
def check_arch_recurse(args, pkgname, arch):
|
||||
""" Recursively check if a package and its dependencies exist (binary repo)
|
||||
or can be built (pmaports) for a certain architecture.
|
||||
:param pkgname: name of the package
|
||||
:param arch: architecture to check against
|
||||
:returns: True when all the package's dependencies can be built or
|
||||
exist for the arch in question
|
||||
"""
|
||||
for pkgname_i in depends_recurse(args, pkgname, arch):
|
||||
if not check_arch(args, pkgname_i, arch):
|
||||
if pkgname_i != pkgname:
|
||||
logging.verbose(pkgname + ": (indirectly) depends on " +
|
||||
pkgname_i)
|
||||
logging.verbose(pkgname_i + ": can't be built for " + arch)
|
||||
return False
|
||||
return True
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue