forked from Mirror/pmbootstrap
pmbootstrap install --no-local-pkgs: new option (MR 1951)
Don't install locally compiled packages and package signing keys. This will be used for the official images generated with pmbootstrap.
This commit is contained in:
parent
05849a9f80
commit
c8d581e749
3 changed files with 27 additions and 3 deletions
|
@ -154,12 +154,20 @@ def create_home_from_skel(args):
|
|||
|
||||
def configure_apk(args):
|
||||
"""
|
||||
Copies over all keys used locally to compile packages, and disables the
|
||||
/mnt/pmbootstrap-packages repository.
|
||||
Copy over all official keys, and the keys used to compile local packages
|
||||
(unless --no-local-pkgs is set). Then disable the /mnt/pmbootstrap-packages
|
||||
repository.
|
||||
"""
|
||||
# Official keys
|
||||
pattern = f"{pmb.config.apk_keys_path}/*.pub"
|
||||
|
||||
# Official keys + local keys
|
||||
if args.install_local_pkgs:
|
||||
pattern = f"{args.work}/config_apk_keys/*.pub"
|
||||
|
||||
# Copy over keys
|
||||
rootfs = args.work + "/chroot_native/mnt/install"
|
||||
for key in glob.glob(args.work + "/config_apk_keys/*.pub"):
|
||||
for key in glob.glob(pattern):
|
||||
pmb.helpers.run.root(args, ["cp", key, rootfs + "/etc/apk/keys/"])
|
||||
|
||||
# Disable pmbootstrap repository
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue