diff --git a/pmb/chroot/apk.py b/pmb/chroot/apk.py index 8ca4e153..6ae0776f 100644 --- a/pmb/chroot/apk.py +++ b/pmb/chroot/apk.py @@ -237,19 +237,6 @@ def install(args, packages, suffix="native", build=True): pmb.chroot.root(args, ["apk", "--no-progress"] + command, suffix=suffix, disable_timeout=True) -def upgrade(args, suffix="native"): - """ - Upgrade all packages installed in a chroot - """ - # Update APKINDEX files - arch = pmb.parse.arch.from_chroot_suffix(args, suffix) - pmb.helpers.repo.update(args, arch) - - # Rebuild and upgrade out-of-date packages - packages = list(installed(args, suffix).keys()) - install(args, packages, suffix) - - def installed(args, suffix="native"): """ Read the list of installed packages (which has almost the same format, as diff --git a/pmb/install/_install.py b/pmb/install/_install.py index 5a723e99..c3276d39 100644 --- a/pmb/install/_install.py +++ b/pmb/install/_install.py @@ -681,8 +681,8 @@ def install(args): install_packages += ["postmarketos-ui-" + args.ui] if args.ui_extras: install_packages += ["postmarketos-ui-" + args.ui + "-extras"] - suffix = "rootfs_" + args.device - pmb.chroot.apk.upgrade(args, suffix) + + pmb.helpers.repo.update(args, args.deviceinfo["arch"]) # Create final user and remove 'build' user set_user(args) @@ -700,6 +700,7 @@ def install(args): # Install all packages to device rootfs chroot (and rebuild the initramfs, # because that doesn't always happen automatically yet, e.g. when the user # installed a hook without pmbootstrap - see #69 for more info) + suffix = "rootfs_" + args.device pmb.chroot.apk.install(args, install_packages, suffix) pmb.install.file.write_os_release(args, suffix) for flavor in pmb.chroot.other.kernel_flavors_installed(args, suffix):