(binary repo reated) Don't specify pkgnames from "provides" as dependencies (#416)

* Don't specify pkgnames from "provides" as dependencies

Always use the regular pkgname. That way, we avoid listing all
kinds of so: files as dependencies (because Alpine automatically
adds them as depends= to the package database). This fixes building
weston, and reproducing the build with `pmbootstrap challenge`.

Additional changes.
* Clear the parsed APKINDEX cache for the current pmbootstrap
  session after building a package
* Avoid rebuilding a package, in case it was already built due to
  circular dependencies
This commit is contained in:
Oliver Smith 2017-08-19 12:52:11 +00:00 committed by GitHub
parent dcdb4d6f3e
commit c323f21ca5
4 changed files with 57 additions and 25 deletions

View file

@ -69,6 +69,10 @@ def package(args, pkgname, carch, force=False, buildinfo=False):
build=False)
pmb.chroot.distccd.start(args, carch_buildenv)
# Avoid re-building for circular dependencies
if not force and not pmb.build.is_necessary(args, carch, apkbuild):
return
# Configure abuild.conf
pmb.build.other.configure_abuild(args, suffix)
@ -116,4 +120,8 @@ def package(args, pkgname, carch, force=False, buildinfo=False):
if "noarch" in apkbuild["arch"]:
pmb.build.symlink_noarch_package(args, output)
# Clear APKINDEX cache
pmb.parse.apkindex.clear_cache(args, args.work + "/packages/" +
carch_buildenv + "/APKINDEX.tar.gz")
return output