From 0352d19ab7ad020ec027531afbda60a5910d38df Mon Sep 17 00:00:00 2001 From: Martijn Braam Date: Wed, 1 Apr 2020 17:05:48 +0200 Subject: [PATCH] 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. --- pmb/chroot/apk.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pmb/chroot/apk.py b/pmb/chroot/apk.py index d9b65b11..f47db9c9 100644 --- a/pmb/chroot/apk.py +++ b/pmb/chroot/apk.py @@ -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"]]