You are not logged in.

#1 2012-12-03 18:31:24

ebal
Member
From: Athens, Greece
Registered: 2009-05-26
Posts: 224
Website

pacman - alternative installation root

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

#2 2012-12-03 18:51:48

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: pacman - alternative installation root

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 StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#3 2012-12-03 19:00:57

ebal
Member
From: Athens, Greece
Registered: 2009-05-26
Posts: 224
Website

Re: pacman - alternative installation root

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

#4 2012-12-03 19:35:09

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: pacman - alternative installation root

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 StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#5 2012-12-03 19:38:45

ebal
Member
From: Athens, Greece
Registered: 2009-05-26
Posts: 224
Website

Re: pacman - alternative installation root

nice idea, i'll use Flyspray

thanks again Xyne


https://balaskas.gr
Linux System Engineer - Registered Linux User #420129

Offline

#6 2012-12-03 20:21:30

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,786
Website

Re: pacman - alternative installation root

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

Board footer

Powered by FluxBB