pmbootstrap install: refactor: move set_user() up (MR 1981)
Don't have the set_user() call weirdly between multiple commands building the install_packages list. Move it up, together with the log message announcing that the device rootfs is being built. Update the comment above set_user(): there is no 'build' user anymore, and at this point we only call it before actually installing the packages for legacy reasons.
This commit is contained in:
parent
fc1ba9ba7b
commit
340329599b
|
@ -666,10 +666,14 @@ def install(args):
|
||||||
pmb.chroot.apk.install(args, pmb.config.install_native_packages,
|
pmb.chroot.apk.install(args, pmb.config.install_native_packages,
|
||||||
build=False)
|
build=False)
|
||||||
|
|
||||||
|
logging.info(f'*** (2/{steps} CREATE DEVICE ROOTFS("{args.device}") ***')
|
||||||
|
|
||||||
|
# Create user before installing packages, so post-install scripts of
|
||||||
|
# pmaports can figure out the username (legacy reasons: pmaports#820)
|
||||||
|
set_user(args)
|
||||||
|
|
||||||
# List all packages to be installed (including the ones specified by --add)
|
# List all packages to be installed (including the ones specified by --add)
|
||||||
# and upgrade the installed packages/apkindexes
|
# and upgrade the installed packages/apkindexes
|
||||||
logging.info('*** (2/{0}) CREATE DEVICE ROOTFS ("{1}") ***'.format(steps,
|
|
||||||
args.device))
|
|
||||||
install_packages = (pmb.config.install_device_packages +
|
install_packages = (pmb.config.install_device_packages +
|
||||||
["device-" + args.device] +
|
["device-" + args.device] +
|
||||||
get_kernel_package(args, args.device) +
|
get_kernel_package(args, args.device) +
|
||||||
|
@ -684,9 +688,6 @@ def install(args):
|
||||||
|
|
||||||
pmb.helpers.repo.update(args, args.deviceinfo["arch"])
|
pmb.helpers.repo.update(args, args.deviceinfo["arch"])
|
||||||
|
|
||||||
# Create final user and remove 'build' user
|
|
||||||
set_user(args)
|
|
||||||
|
|
||||||
# Explicitly call build on the install packages, to re-build them or any
|
# Explicitly call build on the install packages, to re-build them or any
|
||||||
# dependency, in case the version increased
|
# dependency, in case the version increased
|
||||||
if args.extra_packages.lower() != "none":
|
if args.extra_packages.lower() != "none":
|
||||||
|
|
Loading…
Reference in New Issue