forked from Mirror/pmbootstrap
new action: 'pmbootstrap repo_missing'
Add a new action that lists all aports, for which no binary packages exist. Only list packages that can be built for the relevant arch (specified with --arch). This works recursively: when a package can be built for a certain arch, but one of its dependencies (or their depends) can not be built for that arch, then don't list it. This action will be used for the new sr.ht based build infrastructure, to figure out which packages need to be built ahead of time (so we can trigger each of them as single build job). Determining the order of the packages to be built is not determined with pmbootstrap, the serverside code of build.postmarketos.org takes care of that. For testing purposes, a single package can also be specified and the action will list if it can be built for that arch with its dependencies, and what needs to be built exactly. Add pmb/helpers/package.py to hold functions that work on both pmaports and (binary package) repos - in contrary to the existing pmb/helpers/pmaports.py (see previous commit) and pmb/helpers/repo.py, which only work with one of those. Refactoring: * pmb/helpers/pmaports.py: add a get_list() function, which lists all aports and use it instead of writing the same glob loop over and over * add pmb.helpers.pmaports.get(), which finds an APKBUILD and parses it in one step. * rename pmb.build._package.check_arch to ...check_arch_abort to distinguish it from the other check_arch function
This commit is contained in:
parent
a44b80b31d
commit
933c4d0f0d
13 changed files with 787 additions and 29 deletions
|
@ -38,6 +38,7 @@ import pmb.helpers.logging
|
|||
import pmb.helpers.pkgrel_bump
|
||||
import pmb.helpers.pmaports
|
||||
import pmb.helpers.repo
|
||||
import pmb.helpers.repo_missing
|
||||
import pmb.helpers.run
|
||||
import pmb.install
|
||||
import pmb.parse
|
||||
|
@ -161,6 +162,12 @@ def config(args):
|
|||
pmb.helpers.logging.disable()
|
||||
|
||||
|
||||
def repo_missing(args):
|
||||
missing = pmb.helpers.repo_missing.generate(args, args.arch, args.overview,
|
||||
args.package, args.built)
|
||||
print(json.dumps(missing, indent=4))
|
||||
|
||||
|
||||
def index(args):
|
||||
pmb.build.index_repo(args)
|
||||
|
||||
|
@ -259,11 +266,9 @@ def apkbuild_parse(args):
|
|||
# Default to all packages
|
||||
packages = args.packages
|
||||
if not packages:
|
||||
for apkbuild in glob.glob(args.aports + "/*/*/APKBUILD"):
|
||||
packages.append(os.path.basename(os.path.dirname(apkbuild)))
|
||||
packages = pmb.helpers.pmaports.get_list(args)
|
||||
|
||||
# Iterate over all packages
|
||||
packages.sort()
|
||||
for package in packages:
|
||||
print(package + ":")
|
||||
aport = pmb.helpers.pmaports.find(args, package)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue