You are not logged in.

#1 2012-06-07 11:58:06

DaleMox
Member
Registered: 2010-06-17
Posts: 4

Using pacman to install packages into a seperate root

After working with an Arch Linux machine for 1-2 years I switched jobs and was given a Mac, which I've enjoyed so far.
I would, however, like to switch back to Arch Linux but there's something that I've been able to do on Mac OS X using its unofficial package manager Homebrew (http://mxcl.github.com/homebrew/) which I was wondering if it were possible with pacman.

Typically you have one installation of Homebrew, at /usr/local, and by running 'brew' (/usr/local/brew) it knows that its root is at /usr/local & looks there for all dependencies & installs packages there. If, however, you install homebrew elsewhere (could be the first or a second installation), for instance ~/sw, then running brew from there will install packages in that root.

I've found this very useful to install package specific to a project I'm working on (specific vendor & version of DB, specific web server etc) without having to install them globally on my system and at the same time without having to resort to installing everything by hand (including dipendencies).

Is this possible with Pacman?

Thanks in advance,
Dale

Offline

#2 2012-06-07 12:04:06

fiddlinmacx
Member
Registered: 2011-03-02
Posts: 89

Re: Using pacman to install packages into a seperate root

http://www.archlinux.org/pacman/pacman.8.html
I think you want to look at the -b, -r and --cachedir switches (or perhaps an alternate pacman.conf). It looks like it's possible. I think you might have to chroot when you do this though? I've never tried it. Check out the Arch Wiki.

Offline

#3 2012-06-07 12:19:52

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: Using pacman to install packages into a seperate root

What you've omitted about brew is that it compiles everything. You cannot do this on a binary distro unless you first recompile the packages to change the prefix or create an entire separate chroot with a new glibc, coreutils, etc.

Offline

#4 2012-06-08 06:48:53

debdj
Member
Registered: 2012-01-19
Posts: 163

Re: Using pacman to install packages into a seperate root

this wiki isn't entirely related, but can be helpful.
https://wiki.archlinux.org/index.php/Ar … bit_System

4. Sync pacman:

pacman --root /opt/arch32 --cachedir /opt/arch32/var/cache/pacman/pkg --config /opt/arch32/pacman.conf -Sy

5. Install the base and optionally base-devel groups:

pacman --root /opt/arch32 --cachedir /opt/arch32/var/cache/pacman/pkg --config /opt/arch32/pacman.conf -S base base-devel

Offline

#5 2012-06-27 11:36:28

DaleMox
Member
Registered: 2010-06-17
Posts: 4

Re: Using pacman to install packages into a seperate root

Thank you for the replies. I must give this a shot in a virtual environment to check if it works for me.

Offline

Board footer

Powered by FluxBB