You are not logged in.

#1 2012-06-24 18:43:59

OakRaider4Life
Member
Registered: 2012-02-08
Posts: 98

Installing packages to /usr/local

In the pacman man pages it says that the -r flag should not be used to install software to /usr/local instead of /usr. I'm wondering then, what the best way is to use pacman to do exactly that; install software to /usr/local (or even /opt I suppose) instead of /usr. I'm tempted to do it anyways and just respecify the database and logfile paths to the standard root directory. Suggestions?

Offline

#2 2012-06-24 18:48:44

tomegun
Developer
From: France
Registered: 2010-05-28
Posts: 661

Re: Installing packages to /usr/local

You are likely to confuse pacman if you have overlapping installations so to speak (e.g. you have packages installed to both / and /usr/local). /usr/local is usually for when you install stuff without using the package manager (i.e. you hack on a project and do "make install").

What is the reason for wanting to use pacman to install packages with rootdir being /usr/local or /opt?

Offline

#3 2012-06-24 18:54:23

OakRaider4Life
Member
Registered: 2012-02-08
Posts: 98

Re: Installing packages to /usr/local

Well I was using it for code speak for installing anywhere outside of the standard directory really. What I'm really looking at doing is using yaourt to install owncloud from the AUR onto my server, but install it into its own /home folder and symlink it to my http directory rather than having the actual installation on my root directory. So it wouldn't be a standard repo package I'm looking at installing.

Offline

#4 2012-06-24 19:00:09

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

Re: Installing packages to /usr/local

Then build the package to put the files where you want them. Don't abuse pacman flags.

Offline

#5 2012-06-24 19:00:52

tomegun
Developer
From: France
Registered: 2010-05-28
Posts: 661

Re: Installing packages to /usr/local

So this is the kind of thing the manpage means when it says you should not use the "-r" option.

The correct way of doing this would be to alter the PKGBUILD to install to the location you want.

Edit: falconindy beat me to it.

Last edited by tomegun (2012-06-24 19:01:20)

Offline

#6 2012-06-24 19:20:21

OakRaider4Life
Member
Registered: 2012-02-08
Posts: 98

Re: Installing packages to /usr/local

Thanks! This is why I came to the forum before acting on my temptations to forego warnings.

Offline

Board footer

Powered by FluxBB