pmb.chroot.apk: Install less packages explicitly in world

This changes the packages_todo behavior so no packages get added to
/etc/apk/world that are actually dependencies. The only packages that
get explicitly installed into the .pmbootstrap universe are the .apk
files (and inexplicitly their dependencies) which don't get added to
world later because they're a path.
This commit is contained in:
Martijn Braam 2020-04-01 17:05:48 +02:00
parent 44cb06d345
commit 0352d19ab7
No known key found for this signature in database
GPG Key ID: C4280ACB000B060F
1 changed files with 2 additions and 2 deletions

View File

@ -166,7 +166,7 @@ def replace_aports_packages_with_path(args, packages, suffix, arch):
package + "-" + data_repo["version"] + ".apk")
if os.path.exists(args.work + "/chroot_" + suffix + apk_path):
package = apk_path
ret.append(package)
ret.append(package)
return ret
@ -216,7 +216,7 @@ def install(args, packages, suffix="native", build=True):
# Use a virtual package to mark only the explicitly requested packages as
# explicitly installed, not their dependencies or specific paths (#1212)
commands = [["add"] + packages]
if packages != packages_todo:
if len(packages_todo) > 0:
commands = [["add", "-u", "--virtual", ".pmbootstrap"] + packages_todo,
["add"] + packages,
["del", ".pmbootstrap"]]