You are not logged in.

#1 2008-01-08 00:25:02

rdking
Member
From: Halifax NS
Registered: 2005-04-14
Posts: 114

setting paths

this may seem like a really wierd question, but comming from many other distros, one thing I have found with arch, is that sometimes programs are put into wierd locations (by default).  By all means, the user should check the prefix, and change accordingly, but if we know that say mozilla, texlive ect, are gonna be put in /opt....why not at least include that in the default paths?

For instance, I was having trouble compiling gtkpod against libgpod0.6 because the prefix for thier installs is /usr/local/(lib and bin), which aren't in the default paths, so must be added in in ~.bash_profile.

Can someone explain:

Why many programs default to different paths other than usr/lib and usr/bin, and why usr/local and opt are so heavily used.  Is there an advantage....and if so, why not include all possible paths for libs and execs, instead of makinf users update their paths manually.

Not meant to be troll...just asking a question, like to know why, and what is the best way to update your search paths etc.

Offline

#2 2008-01-08 00:29:30

theringmaster
Member
From: Air Force
Registered: 2007-07-16
Posts: 581
Website

Re: setting paths

yeah this is a issue and the devs say that they are trying to get things out of /opt/


Check me out on twitter!!! twitter.com/The_Ringmaster

Offline

#3 2008-01-08 00:30:44

rdking
Member
From: Halifax NS
Registered: 2005-04-14
Posts: 114

Re: setting paths

just set up yaourt....haven't poked around yet....but will do shortly...thanks looks like a great idea.

Offline

#4 2008-01-08 00:38:03

rdking
Member
From: Halifax NS
Registered: 2005-04-14
Posts: 114

Re: setting paths

I guess, I really would like to know where programs are gonna be put outside of the regular paths, and how to set up /etc/profile to handle the new libpaths, exec paths etc.

For instance, How to ensure /usr/local {bin and opt} get in there and /opt/program/bin etc etc

Offline

#5 2008-01-08 00:39:54

Misfit138
Misfit Emeritus
From: USA
Registered: 2006-11-27
Posts: 4,189

Re: setting paths

rdking wrote:

this may seem like a really wierd question, but comming from many other distros, one thing I have found with arch, is that sometimes programs are put into wierd locations (by default).  By all means, the user should check the prefix, and change accordingly, but if we know that say mozilla, texlive ect, are gonna be put in /opt....why not at least include that in the default paths?

For instance, I was having trouble compiling gtkpod against libgpod0.6 because the prefix for thier installs is /usr/local/(lib and bin), which aren't in the default paths, so must be added in in ~.bash_profile.

Can someone explain:

Why many programs default to different paths other than usr/lib and usr/bin, and why usr/local and opt are so heavily used.  Is there an advantage....and if so, why not include all possible paths for libs and execs, instead of makinf users update their paths manually.

Not meant to be troll...just asking a question, like to know why, and what is the best way to update your search paths etc.

/usr/local is *yours*. There is nothing in there at all by default. If you want to compile a package and install with make make install, then /usr/local is the place to put it, because Arch uses /usr. It is good practice to use --prefix=/usr/local, so your own compiled installs can peacefully co-exist with pacman's installed packages (which Arch will put in /usr, or /opt.)
/opt is simply for stuff which has historically been somewhat of a 'misfit', not fitting cleanly into /usr. 
As for your $PATH, check your /etc/profile- my /etc/profile shows mine as:

export PATH="/bin:/usr/bin:/sbin:/usr/sbin:/usr/X11R6/bin:/opt/bin"

by default. So opt/bin is in there.
EDIT: And remember, anything installed to /opt will require you to update your path before your run it. Either that, or log out and in. wink

Last edited by Misfit138 (2008-01-08 00:44:16)

Offline

#6 2008-01-08 00:44:07

rdking
Member
From: Halifax NS
Registered: 2005-04-14
Posts: 114

Re: setting paths

ok, so is there an isue say with 2 copies of libgpod...one installed by pacman, residing in /usr/bin, and one residing in /usr/local compiled by me. 

Is the order of the paths set out in /etc/profile important...for instance, will a program use say lib###.so.2 in usr/bin if lib###.so.3 is in /usr/local, but defined in /etc/profile later?

Offline

#7 2008-01-08 00:51:30

Misfit138
Misfit Emeritus
From: USA
Registered: 2006-11-27
Posts: 4,189

Re: setting paths

rdking wrote:

ok, so is there an isue say with 2 copies of libgpod...one installed by pacman, residing in /usr/bin, and one residing in /usr/local compiled by me. 

Is the order of the paths set out in /etc/profile important...for instance, will a program use say lib###.so.2 in usr/bin if lib###.so.3 is in /usr/local, but defined in /etc/profile later?

In that case, the binary you run from the command line will be in the path which appears first, unless you specify the full path to it. So running gtkpod will run the one installed in /usr/ (if it is there, and specified first) and then call on the library under /usr. If you specify the path to the one in /usr/local/bin/gtkpod, ( by running it from the command line like: /usr/local/bin/gtkpod) it should call on the library under /usr/local.

Last edited by Misfit138 (2008-01-08 00:52:55)

Offline

#8 2008-01-08 00:55:14

rdking
Member
From: Halifax NS
Registered: 2005-04-14
Posts: 114

Re: setting paths

ok, in that case, can pacman remove gtkpod, and all of it's files...I did a pacman -R gtkpod, but it left the old libgopd cause they weren't orphaned i guess....how do I tell what programs still want the old libgpod, and then make them recognize the new lipgpod in /usr/local

Offline

#9 2008-01-08 01:02:47

Misfit138
Misfit Emeritus
From: USA
Registered: 2006-11-27
Posts: 4,189

Re: setting paths

rdking wrote:

ok, in that case, can pacman remove gtkpod, and all of it's files...I did a pacman -R gtkpod, but it left the old libgopd cause they weren't orphaned i guess....how do I tell what programs still want the old libgpod, and then make them recognize the new lipgpod in /usr/local

pacman -R merely removes a package. You might want to pacman -Rs, -Rsc or -Rsn.
Read the pacman man page under  REMOVE OPTIONS
       -c, --cascade
              Remove  all  target  packages, as well as all packages that depend on one or
              more target packages. This operation is recursive.

       -k, --keep
              Removes the database entry only. Leaves all files in place.

       -n, --nosave
              Instructs pacman to ignore file backup designations.  Normally, when a  file
              is removed from the system the database is checked to see if the file should
              be renamed with a .pacsave extension.

       -s, --recursive
              Remove each target specified including all dependencies, provided  that  (A)
              they  are  not  required by other packages; and (B) they were not explicitly
              installed by the user.  This option is analogous to a backwards --sync oper-
              ation.
and QUERY OPTIONS.

Last edited by Misfit138 (2008-01-08 01:03:45)

Offline

#10 2008-01-09 12:30:21

byte
Member
From: Düsseldorf (DE)
Registered: 2006-05-01
Posts: 2,046

Re: setting paths

Modify /etc/ld.so.conf if you install libraries in non-standard paths. And as already said, /opt will go away over time and there's already several bug reports about path issues.


1000

Offline

#11 2008-01-09 14:25:18

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: setting paths

We package no packages for /usr/local. As said above, it's yours.

We're also moving stuff out of /opt... so soon it should just be /usr.

Offline

Board footer

Powered by FluxBB