Close #256: Implement strict package building mode (#532)

Contrary to abuild, pmbootstrap only installs makedepends, and
keeps the installed packages around - both hacks save lots of time.

However, they may introduce missing makedepends in the APKBUILDs,
that the authors of the APKBUILDs do not notice because it works
for them.

This PR adss a strict mode, which will always clean the chroots
before building a package, and also remove all installed dependencies
after the package was built. You can use the following syntax to
only zap once, but build many packages at once:
`pmbootstrap build --strict hello-world 0xffff heimdall`

It also builds dependencies properly without leaving makedepends
behind.
This commit is contained in:
Oliver Smith 2017-09-08 23:50:59 +00:00 committed by GitHub
parent 9f5607d4c3
commit bed1eacbb5
4 changed files with 34 additions and 10 deletions

View file

@ -79,9 +79,11 @@ def aportgen(args):
def build(args):
if args.strict:
pmb.chroot.zap(args, False)
for package in args.packages:
pmb.build.package(args, package, args.arch, args.force,
args.buildinfo)
args.buildinfo, args.strict)
def build_init(args):