FS#58778 - [arch-install-scripts] warning: option --root is deprecated; use --sysroot instead
Attached to Project:
Arch Linux
Opened by Sean Enck (enckse) - Tuesday, 29 May 2018, 14:42 GMT
Last edited by Jelle van der Waa (jelly) - Monday, 18 September 2023, 17:53 GMT
Opened by Sean Enck (enckse) - Tuesday, 29 May 2018, 14:42 GMT
Last edited by Jelle van der Waa (jelly) - Monday, 18 September 2023, 17:53 GMT
|
Details
Description:
looks like pacstrap is still calling pacman (5.1.0) with "-r" which is deprecated Additional info: arch-install-scripts 18-1 pacman 5.1.0-1 Steps to reproduce: install pacman 5.1.0 and pacstrap (e.g. a systemd-nspawn container) looks like this is where the message is produced: msg 'Installing packages to %s' "$newroot" if ! pacman -r "$newroot" -Sy "${pacman_args[@]}"; then |
This task depends upon
This task blocks these from closing
FS#49347 - [arch-install-scripts] pacstrap maybe should set
--hookdir
Closed by Jelle van der Waa (jelly)
Monday, 18 September 2023, 17:53 GMT
Reason for closing: Moved
Additional comments about closing: https://gitlab.archlinux.org/archlinux/a rch-install-scripts/issues/61
Monday, 18 September 2023, 17:53 GMT
Reason for closing: Moved
Additional comments about closing: https://gitlab.archlinux.org/archlinux/a rch-install-scripts/issues/61
The --root option is not going away any time soon, so we have time to figure out the best way to handle this.
It might be enough to pre-create /etc/pacman.{conf,d/} and /var/{cache,lib}/pacman/
Unfortunately it doesn't work due to the --sysroot not having internet. Note: this works fine in an existing chroot.
- /etc/resolv.conf from host system is needed in sysroot
- /usr/lib/libnss_dns.so.2 from glibc is needed in sysroot
Hope this helps.
No news yet, but it's definitely a reason why we're not intending to remove the --root option in any upcoming pacman 6.x release. At least until --sysroot can properly handle bootstrapping a new system.
Also, as long as --sysroot is not a complete replacement for --root, the "obsolete" warning should not be there because clearly it isn't.
Currently even --root doesn't work because the alpm library fails to initialize because it's not getting the --root information and looks for the packages in the wrong place. It's rather annoying.
OG.
I get why sysroot is probably what users are actually looking for in 95% of situations... But it still has its very own use cases as a last ditch command I guess. And if you could just reword its description (or just casually mention it in sysroot's one, if you think it's deceiving?) it would be helpful imo.