public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] Prefixed Emerge's
@ 2002-04-16 19:06 Adam Voigt
  2002-04-16 19:30 ` Paul de Vrieze
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Adam Voigt @ 2002-04-16 19:06 UTC (permalink / raw
  To: gentoo-dev

I was just curious if adding the feature of custom prefixes on emerge's (the equivalent of --prefix on a configure)
would be terribly hard to do, I ask because I would like to help and don't want to bother those of you working on
serious issues with this feature request. As I understand it, all it would really entail is checking if the enviorment
variable PREFIX is set and if it is switch PREFIX for /usr or whatever the path is in each ebuild. So for instance, if
you were installing mysql if PREFIX = "/usr/mysql" then everything would be set under that directory, so there would
be /usr/mysql/var for the actual db, etc. Is this correct?
And if it is, does this mean any package which supports custom prefix must have it's ebuild, hand edited? If this
is correct I wouldn't mind going through and at least starting on some of more popular packages to add custom
pathing's. If I am totally off base on this, I aplogize, this was just what popped into my head as a possible solution to
the problem.

Thanks,

Adam Voigt
adam.voigt@cryptocomm.com


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-dev] Prefixed Emerge's
  2002-04-16 19:06 [gentoo-dev] Prefixed Emerge's Adam Voigt
@ 2002-04-16 19:30 ` Paul de Vrieze
  2002-04-16 19:35 ` Adam Voigt
  2002-04-16 21:44 ` Arcady Genkin
  2 siblings, 0 replies; 12+ messages in thread
From: Paul de Vrieze @ 2002-04-16 19:30 UTC (permalink / raw
  To: gentoo-dev

On Tuesday 16 April 2002 21:06, Adam Voigt wrote:
> I was just curious if adding the feature of custom prefixes on
> emerge's (the equivalent of --prefix on a configure) would be
> terribly hard to do, I ask because I would like to help and don't
> want to bother those of you working on serious issues with this
> feature request. As I understand it, all it would really entail is
> checking if the enviorment variable PREFIX is set and if it is
> switch PREFIX for /usr or whatever the path is in each ebuild. So
> for instance, if you were installing mysql if PREFIX = "/usr/mysql"
> then everything would be set under that directory, so there would
> be /usr/mysql/var for the actual db, etc. Is this correct? And if
> it is, does this mean any package which supports custom prefix must
> have it's ebuild, hand edited? If this is correct I wouldn't mind
> going through and at least starting on some of more popular
> packages to add custom pathing's. If I am totally off base on this,
> I aplogize, this was just what popped into my head as a possible
> solution to the problem.
>

Don't forget a lot of software breaks if it is moved to unknown 
directories, so whatever you do, make it an option that an ebuild 
could turn on.

Paul

-- 
Paul de Vrieze
Junior Researcher
Mail: pauldv@cs.kun.nl
Homepage: http://www.devrieze.net


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Re: [gentoo-dev] Prefixed Emerge's
  2002-04-16 19:06 [gentoo-dev] Prefixed Emerge's Adam Voigt
  2002-04-16 19:30 ` Paul de Vrieze
@ 2002-04-16 19:35 ` Adam Voigt
  2002-04-16 19:38   ` Paul de Vrieze
  2002-04-16 19:49   ` Adam Voigt
  2002-04-16 21:44 ` Arcady Genkin
  2 siblings, 2 replies; 12+ messages in thread
From: Adam Voigt @ 2002-04-16 19:35 UTC (permalink / raw
  To: gentoo-dev

If you mean a override switch where an ebuild could turn off allowing
a custom prefix, I would think it would be as simple as at the top of that
ebuild setting PREFIX="", to override the enviorment variable.

Also, if you mean dependenices for each package, I would think those packages
would still go to there default directory (for instance I don't see any reason
for the gnome-lib package to go anywhere but /usr/lib or wherver it needs to go,
plus if they really wanted to, they could just edit the /etc/ld.so.conf if they know
the libraries will be in a special directory).

Adam Voigt
adam.voigt@cryptocomm.com

On Tue, 16 Apr 2002 21:30:29 +0200, Paul de Vrieze <paul@devrieze.net> wrote:
> On Tuesday 16 April 2002 21:06, Adam Voigt wrote:
> > I was just curious if adding the feature of custom prefixes on
> > emerge's (the equivalent of --prefix on a configure) would be
> > terribly hard to do, I ask because I would like to help and don't
> > want to bother those of you working on serious issues with this
> > feature request. As I understand it, all it would really entail is
> > checking if the enviorment variable PREFIX is set and if it is
> > switch PREFIX for /usr or whatever the path is in each ebuild. So
> > for instance, if you were installing mysql if PREFIX = "/usr/mysql"
> > then everything would be set under that directory, so there would
> > be /usr/mysql/var for the actual db, etc. Is this correct? And if
> > it is, does this mean any package which supports custom prefix must
> > have it's ebuild, hand edited? If this is correct I wouldn't mind
> > going through and at least starting on some of more popular
> > packages to add custom pathing's. If I am totally off base on this,
> > I aplogize, this was just what popped into my head as a possible
> > solution to the problem.
> >
> 
> Don't forget a lot of software breaks if it is moved to unknown
> directories, so whatever you do, make it an option that an ebuild
> could turn on.
> 
> Paul
> 
> --
> Paul de Vrieze
> Junior Researcher
> Mail: pauldv@cs.kun.nl
> Homepage: http://www.devrieze.net
> _______________________________________________
> gentoo-dev mailing list
> gentoo-dev@gentoo.org
> http://lists.gentoo.org/mailman/listinfo/gentoo-dev


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Re: [gentoo-dev] Prefixed Emerge's
  2002-04-16 19:35 ` Adam Voigt
@ 2002-04-16 19:38   ` Paul de Vrieze
  2002-04-16 19:49   ` Adam Voigt
  1 sibling, 0 replies; 12+ messages in thread
From: Paul de Vrieze @ 2002-04-16 19:38 UTC (permalink / raw
  To: gentoo-dev

On Tuesday 16 April 2002 21:35, Adam Voigt wrote:
> If you mean a override switch where an ebuild could turn off
> allowing a custom prefix, I would think it would be as simple as at
> the top of that ebuild setting PREFIX="", to override the
> enviorment variable.
>
> Also, if you mean dependenices for each package, I would think
> those packages would still go to there default directory (for
> instance I don't see any reason for the gnome-lib package to go
> anywhere but /usr/lib or wherver it needs to go, plus if they
> really wanted to, they could just edit the /etc/ld.so.conf if they
> know the libraries will be in a special directory).
>

I mean it the other way around. You still need to specify the original 
prefix anyway (so that docs and config files don't move as it really 
breaks things). You also want to be compatible with existing ebuilds

-- 
Paul de Vrieze
Junior Researcher
Mail: pauldv@cs.kun.nl
Homepage: http://www.devrieze.net


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Re: [gentoo-dev] Prefixed Emerge's
  2002-04-16 19:35 ` Adam Voigt
  2002-04-16 19:38   ` Paul de Vrieze
@ 2002-04-16 19:49   ` Adam Voigt
  2002-04-16 19:55     ` Paul de Vrieze
  1 sibling, 1 reply; 12+ messages in thread
From: Adam Voigt @ 2002-04-16 19:49 UTC (permalink / raw
  To: gentoo-dev

Well I was thinking of making the original prefix the default, so
essentially if PREFIX is set then like where the default path would
be /var then the new path would be PREFIX/var, but if PREFIX is empty, then
it just goes to /var. I was debating whether like man pages should still go to the
default directory, because as much sense as it makes to make them go the default
man directory, the ./configure doesn't pay attention to where man pages are supposed
to go, it says "alright, I hope you know what your doing" and puts everything,
under your PREFIX, so that would be an absolute control type deal, but having
it set them in the default man page dir would be more helpful in 99% of cases, so
it's kind of a tossup.

Adam Voigt
adam.voigt@cryptocomm.com

On Tue, 16 Apr 2002 21:38:33 +0200, Paul de Vrieze <paul@devrieze.net> wrote:
> On Tuesday 16 April 2002 21:35, Adam Voigt wrote:
> > If you mean a override switch where an ebuild could turn off
> > allowing a custom prefix, I would think it would be as simple as at
> > the top of that ebuild setting PREFIX="", to override the
> > enviorment variable.
> >
> > Also, if you mean dependenices for each package, I would think
> > those packages would still go to there default directory (for
> > instance I don't see any reason for the gnome-lib package to go
> > anywhere but /usr/lib or wherver it needs to go, plus if they
> > really wanted to, they could just edit the /etc/ld.so.conf if they
> > know the libraries will be in a special directory).
> >
> 
> I mean it the other way around. You still need to specify the original
> prefix anyway (so that docs and config files don't move as it really
> breaks things). You also want to be compatible with existing ebuilds
> 
> --
> Paul de Vrieze
> Junior Researcher
> Mail: pauldv@cs.kun.nl
> Homepage: http://www.devrieze.net
> _______________________________________________
> gentoo-dev mailing list
> gentoo-dev@gentoo.org
> http://lists.gentoo.org/mailman/listinfo/gentoo-dev


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Re: [gentoo-dev] Prefixed Emerge's
  2002-04-16 19:49   ` Adam Voigt
@ 2002-04-16 19:55     ` Paul de Vrieze
  0 siblings, 0 replies; 12+ messages in thread
From: Paul de Vrieze @ 2002-04-16 19:55 UTC (permalink / raw
  To: gentoo-dev

On Tuesday 16 April 2002 21:49, Adam Voigt wrote:
> Well I was thinking of making the original prefix the default, so
> essentially if PREFIX is set then like where the default path would
> be /var then the new path would be PREFIX/var, but if PREFIX is
> empty, then it just goes to /var. I was debating whether like man
> pages should still go to the default directory, because as much
> sense as it makes to make them go the default man directory, the
> ./configure doesn't pay attention to where man pages are supposed
> to go, it says "alright, I hope you know what your doing" and puts
> everything, under your PREFIX, so that would be an absolute control
> type deal, but having it set them in the default man page dir would
> be more helpful in 99% of cases, so it's kind of a tossup.
>

Maybe I was thinking too much about binary packages. You are right, 
for ebuilds (disable prefixing on binary packages) prefixes can be 
compiled in not breaking packages. Packages that support prefix can 
use it in their config scripts, others (such as glibc) don't.

Paul

-- 
Paul de Vrieze
Junior Researcher
Mail: pauldv@cs.kun.nl
Homepage: http://www.devrieze.net


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-dev] Prefixed Emerge's
  2002-04-16 19:06 [gentoo-dev] Prefixed Emerge's Adam Voigt
  2002-04-16 19:30 ` Paul de Vrieze
  2002-04-16 19:35 ` Adam Voigt
@ 2002-04-16 21:44 ` Arcady Genkin
  2 siblings, 0 replies; 12+ messages in thread
From: Arcady Genkin @ 2002-04-16 21:44 UTC (permalink / raw
  To: gentoo-dev

Adam Voigt <adam.voigt@cryptocomm.com> writes:

> I was just curious if adding the feature of custom prefixes on
> emerge's (the equivalent of --prefix on a configure) would be
> terribly hard to do, 

A lot of ebuilds are written with the premise that the stuff goes into
/usr, and have it hard coded. :(  Even if portage starts supporting
custom prefixes, a huge ebuild cleanup effort would be required, as
far as I understand.

I, too, would *love* to be able to be able to define a custom prefix
when installing ebuilds.  Among other things, this would make portage
more portable.

And portability of Portage would really be a big a great advantage for
Gentoo as a project.  Once the users of other distros start trying out
portage, there would be a big influx of new Gentoo users, IMO.

Hopefully that would be one of the features included in Portage 2...
-- 
Arcady Genkin
Don't read everything you believe.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: [gentoo-dev] Prefixed Emerge's
@ 2002-04-17 14:44 Sean Mitchell
  2002-04-17 14:47 ` Jared H. Hudson
  0 siblings, 1 reply; 12+ messages in thread
From: Sean Mitchell @ 2002-04-17 14:44 UTC (permalink / raw
  To: 'gentoo-dev@gentoo.org'

> A lot of ebuilds are written with the premise that the stuff goes into
> /usr, and have it hard coded. :(  Even if portage starts supporting
> custom prefixes, a huge ebuild cleanup effort would be required, as
> far as I understand.

What's the alternative to something like

    make prefix=${D}/usr mandir=${D}/usr/share/man install || die

then? Is there a better way?

Sean


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-dev] Prefixed Emerge's
  2002-04-17 14:44 Sean Mitchell
@ 2002-04-17 14:47 ` Jared H. Hudson
  0 siblings, 0 replies; 12+ messages in thread
From: Jared H. Hudson @ 2002-04-17 14:47 UTC (permalink / raw
  To: gentoo-dev

./configure --prefix=${D}/usr mandir=${D}/usr/share/man || die

Sean Mitchell wrote:
>>A lot of ebuilds are written with the premise that the stuff goes into
>>/usr, and have it hard coded. :(  Even if portage starts supporting
>>custom prefixes, a huge ebuild cleanup effort would be required, as
>>far as I understand.
> 
> 
> What's the alternative to something like
> 
>     make prefix=${D}/usr mandir=${D}/usr/share/man install || die
> 
> then? Is there a better way?
> 
> Sean
> _______________________________________________
> gentoo-dev mailing list
> gentoo-dev@gentoo.org
> http://lists.gentoo.org/mailman/listinfo/gentoo-dev




^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: [gentoo-dev] Prefixed Emerge's
@ 2002-04-17 14:53 Sean Mitchell
  2002-04-17 15:00 ` Jared H. Hudson
  2002-04-17 18:36 ` Paul de Vrieze
  0 siblings, 2 replies; 12+ messages in thread
From: Sean Mitchell @ 2002-04-17 14:53 UTC (permalink / raw
  To: 'gentoo-dev@gentoo.org'


> From: Jared H. Hudson [mailto:jhhudso@volumehost.com]

>>>A lot of ebuilds are written with the premise that the 
>>> stuff goes into /usr, and have it hard coded. :(  Even
>>> if portage starts supporting
>>> custom prefixes, a huge ebuild cleanup effort would be required, as
>>> far as I understand.

>> What's the alternative to something like
>> 
>>     make prefix=${D}/usr mandir=${D}/usr/share/man install || die
>> 
>> then? Is there a better way?

> ./configure --prefix=${D}/usr mandir=${D}/usr/share/man || die

No, you miss my point.... what's the alternative to hardcoding /usr?

Cheers,

Sean


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-dev] Prefixed Emerge's
  2002-04-17 14:53 Sean Mitchell
@ 2002-04-17 15:00 ` Jared H. Hudson
  2002-04-17 18:36 ` Paul de Vrieze
  1 sibling, 0 replies; 12+ messages in thread
From: Jared H. Hudson @ 2002-04-17 15:00 UTC (permalink / raw
  To: gentoo-dev

I can't think of any. Most/All source packages attempt to install in 
/usr/local. That's why /usr has to be specified.

-Jared H.

Sean Mitchell wrote:
> 
>>From: Jared H. Hudson [mailto:jhhudso@volumehost.com]
> 
> 
>>>>A lot of ebuilds are written with the premise that the 
>>>>stuff goes into /usr, and have it hard coded. :(  Even
>>>>if portage starts supporting
>>>>custom prefixes, a huge ebuild cleanup effort would be required, as
>>>>far as I understand.
>>>
> 
>>>What's the alternative to something like
>>>
>>>    make prefix=${D}/usr mandir=${D}/usr/share/man install || die
>>>
>>>then? Is there a better way?
>>
> 
>>./configure --prefix=${D}/usr mandir=${D}/usr/share/man || die
> 
> 
> No, you miss my point.... what's the alternative to hardcoding /usr?
> 
> Cheers,
> 
> Sean
> _______________________________________________
> gentoo-dev mailing list
> gentoo-dev@gentoo.org
> http://lists.gentoo.org/mailman/listinfo/gentoo-dev




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [gentoo-dev] Prefixed Emerge's
  2002-04-17 14:53 Sean Mitchell
  2002-04-17 15:00 ` Jared H. Hudson
@ 2002-04-17 18:36 ` Paul de Vrieze
  1 sibling, 0 replies; 12+ messages in thread
From: Paul de Vrieze @ 2002-04-17 18:36 UTC (permalink / raw
  To: gentoo-dev

On Wednesday 17 April 2002 16:53, Sean Mitchell wrote:
> > ./configure --prefix=${D}/usr mandir=${D}/usr/share/man || die
>
> No, you miss my point.... what's the alternative to hardcoding
> /usr?
>
PREFIX="/usr"
./configure --prefix=${PREFIX} mandir=/usr/share/man || die
make

make DESTDIR=${D} install

Use the destdir to specify where the files need to be installed. 
Prefix specifies where files are going to be when the program is run. 
Most programs support the DESTDIR variable. Sometimes overriding 
prefix at the install also works. But NEVER do it at compile time, as 
that might break things.

If there is no easy way to have DESTDIR (or equiv) support you need to 
edit the makefile, and add it. That's very rare though. Most times 
you only need to specify every other destination option on the make 
install line.

Paul

-- 
Paul de Vrieze
Junior Researcher
Mail: pauldv@cs.kun.nl
Homepage: http://www.devrieze.net


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2002-04-17 18:36 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-04-16 19:06 [gentoo-dev] Prefixed Emerge's Adam Voigt
2002-04-16 19:30 ` Paul de Vrieze
2002-04-16 19:35 ` Adam Voigt
2002-04-16 19:38   ` Paul de Vrieze
2002-04-16 19:49   ` Adam Voigt
2002-04-16 19:55     ` Paul de Vrieze
2002-04-16 21:44 ` Arcady Genkin
  -- strict thread matches above, loose matches on Subject: below --
2002-04-17 14:44 Sean Mitchell
2002-04-17 14:47 ` Jared H. Hudson
2002-04-17 14:53 Sean Mitchell
2002-04-17 15:00 ` Jared H. Hudson
2002-04-17 18:36 ` Paul de Vrieze

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox