You are not logged in.

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

ebal
Member
From: Athens, GReece
Registered: 2009-05-26
Posts: 213
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 ?


http://Ευάγγελος.Μπαλάσκας.gr
Unix System Engineer - Registered Linux User #420129

Offline

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

Xyne
Moderator/TU
Registered: 2008-08-03
Posts: 5,644
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.

Offline

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

ebal
Member
From: Athens, GReece
Registered: 2009-05-26
Posts: 213
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 ?


http://Ευάγγελος.Μπαλάσκας.gr
Unix System Engineer - Registered Linux User #420129

Offline

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

Xyne
Moderator/TU
Registered: 2008-08-03
Posts: 5,644
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.

Offline

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

ebal
Member
From: Athens, GReece
Registered: 2009-05-26
Posts: 213
Website

Re: pacman - alternative installation root

nice idea, i'll use Flyspray

thanks again Xyne


http://Ευάγγελος.Μπαλάσκας.gr
Unix System Engineer - Registered Linux User #420129

Offline

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

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 5,146

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: ASUS P8Z77-V PRO // Processor: Intel Core i7-3770K 3.4GHz // GFX: nVidia GeForce GTX 970 Ti // RAM: 32GB (4x 8GB) Corsair DDR3 (@ 2133MHz) // Storage: 1x 3TB Seagate SATAII 5x 1TB Samsung SATAII, 2x 120GB Corsair SSD

Offline

Board footer

Powered by FluxBB