Fix pmbootstrap zap -m / various zap improvements (#1166)

zap -m:
* APKINDEX parsing: parse the "origin" field as well, so we know
  where a subpackage comes from
* pmbootstrap zap -m: properly delete all packages, that do not
  have an aport or where the aport has another version. This also
  works with subpackages now,
  we use the origin field to resolve it.
* Only reindex when packages have been deleted in "zap -m"

zap in general:
* Show the amount of cleared up space after the deletion instead
  of "Done"
* Print "Shutdown complete" to "pmbootstrap log" instead of stdout
  (we need to call it twice during zap now to get the space
  calculation right)
* Add `--dry` argument to `pmbootstrap zap` (this was very useful
  for debugging) to list the packages/chroots that would get
  deleted
* Roughly output the command that would get executed to delete
  files, so it's obvious what's going on in --dry mode. (% rm ...)
This commit is contained in:
Oliver Smith 2018-01-31 19:34:02 +00:00 committed by GitHub
parent 8f099d3506
commit 0f5056f6b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 97 additions and 48 deletions

View file

@ -329,10 +329,13 @@ def log_distccd(args):
def zap(args):
pmb.chroot.zap(args, packages=args.packages, http=args.http,
pmb.chroot.zap(args, dry=args.dry, packages=args.packages, http=args.http,
mismatch_bins=args.mismatch_bins, old_bins=args.old_bins,
distfiles=args.distfiles)
# Don't write the "Done" message
pmb.helpers.logging.disable()
def bootimg_analyze(args):
bootimg = pmb.parse.bootimg(args, args.path)