Fix pmbootstrap zap -m / various zap improvements
Created by: ollieparanoid
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 topmbootstrap 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 PR relates to streamlining the binary repository (#970 (closed)), because it makes it possible to delete outdated packages properly.