You are not logged in.
I know that, when you are trying to install archlinux to a different root path
you should create the dbpath before or add your own dbpath as a command line option.
eg.
# mkdir -pv /mnt/var/lib/pacman
# pacman -Sy base -r /mnt -v -y
or
# pacman -Sy base -r /mnt --dbpath /var/lib/pacman -v -y
the above examples are two different things, but you get my point (hopefully)
Whouldn't be possible pacman to use /var/lib/pacman (system folder) by default ?
https://balaskas.gr
Linux System Engineer - Registered Linux User #420129
Offline
No, the whole point of the --root option is to tell Pacman to use paths within that root. If you had to manually configure each and every path (db, cache, gpg) then not only would the --root option be useless, setting roots would also be highly error-prone.
If you don't want to use the --dbpath command-line option, create a custom pacman.conf file and use that with the "--config" option to install to a different root.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
thanks Xyne,
thats reasonable enough. Every dir must be under the new root path.
I cant use the first example without creating the var/lib/pacman dir inside root path first.
For me, an error about initialize alpm library is something that i can handle but it could be more user friendly (bad words ?) if pacman could create the var/lib/pacman inside the new root path.
No ?
https://balaskas.gr
Linux System Engineer - Registered Linux User #420129
Offline
You mean this message?
$ pacman -Syr foo/
error: failed to initialize alpm library (could not find or read directory)
I agree, it is not helpful. You can submit a request for auto-creation of missing directories to the pacman-dev mailing list, or at least request a more helpful message. The devs will likely tell you to submit a patch, but given how simple this should be, one of them may do it for you.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
nice idea, i'll use Flyspray
thanks again Xyne
https://balaskas.gr
Linux System Engineer - Registered Linux User #420129
Offline
The existing directory requirement is useful imo, it prevents you for accidentally installing things to the wrong place with -r, because of user error (e.g. using '-r /mnt' instead of '-r /mnt/newroot').
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline