Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 6986 - Portage Feature Request - Custom emerge settings
Summary: Portage Feature Request - Custom emerge settings
Status: RESOLVED WONTFIX
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All All
: High enhancement
Assignee: Portage team
URL:
Whiteboard:
Keywords:
: 7858 13042 (view as bug list)
Depends on: 1262
Blocks:
  Show dependency tree
 
Reported: 2002-08-24 13:33 UTC by Tim Hosking
Modified: 2011-10-30 22:36 UTC (History)
8 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Hosking 2002-08-24 13:33:40 UTC
I need the ability to provide custom replacements for sections of ebuild files.
I don't want to replace the whole file, and I don't want to have to copy files
into $PORTDIR_OVERLAY and edit them every time a new version of the package is
released. Take for example the configuration section of the net-mail/courier
ebuild.It contains something like:

        ./configure \
                --prefix=/usr \
                --disable-root-check \
and so on.

I don't want to change the whole ebuild file, just a few lines of it. Let's say
we surround this with arbitrary tags...

#REPLACE-1
        ./configure \
                --prefix=/usr \

#END-REPLACE-1

Now, in the /etc/make.profile directory we have patch files, e.g. in
/etc/make.profile/net-mail/courier we have this:

#REPLACE-1.1
        ./configure \
                --prefix=/usr/local \
                --disable-root-check \
                --with-mail-user=courier
#END-REPLACE-1.1

Every time a later version of courier is released, the same patch will be
applied without user intervention. If The ebuild maintainer wants to drastically
change the way the ebuild is managed, or simply wants to add new options to this
section, all they have to do is change the tag names (#REPLACE-1.1 becomes
#REPLACE-1.2) so that emerge can alert the user that their patch needs attention.

What do you think?

-- 
Tim Hosking
Comment 1 SpanKY gentoo-dev 2002-09-12 23:22:12 UTC
*** Bug 7858 has been marked as a duplicate of this bug. ***
Comment 2 Tim Hosking 2002-09-13 00:35:22 UTC
Amendment:

I said:

#REPLACE-1
        ./configure \
                --prefix=/usr \

#END-REPLACE-1

I meant:



#REPLACE-1.1
        ./configure \
                --prefix=/usr \

#END-REPLACE-1.1

Minor change but you get the picture
Comment 3 Kevin Duffy 2002-09-13 00:55:11 UTC
I think it would also be good to implement a command line option for changing
the configure flags.  This way users can test out various options before
deciding on something to put in their patches directory.  In this example, it
would look something like `emerge courier unconfigure="--prefix=/usr"
configure="--prefix=/usr/local --with-mail-user=courier` This feature would be
very useful for configure options such as these that USE variables can't, or
shouldn't, exist for.
Comment 4 Dusan Vujosevic 2002-09-20 23:32:58 UTC
That would be a cool thing! I need that for courier as well.
Comment 5 David Menday 2002-10-18 07:41:01 UTC
It would be nice if you could change configure parameters for an ebuild with       
a file either in portage dir or in PORTDIR_OVERLAY.   
lets say it is called configure_options and  
contains:  
remove --prefix   
add --prefix=/otherpartition/onbiggerdisk  
add --disable-root-check  
  
Comment 6 John-David Childs 2002-12-03 17:43:06 UTC
or, as I wrote in #6677 (PORTAGE_OVERLAY suggestions):

get rid of PORTAGE_OVERLAY

have emerge look for a *.local file in the portage directory tree (e.g.
net-www/mozilla/) and use that to OVERRIDE settings in the (unmasked and/or
latest  depending upon ~STABLE flag) ebuild file
Comment 7 SpanKY gentoo-dev 2003-01-01 16:06:38 UTC
*** Bug 13042 has been marked as a duplicate of this bug. ***
Comment 8 Marius Mauch (RETIRED) gentoo-dev 2003-11-24 22:47:13 UTC
You realize that this feature would create a maintenance nightmare for gentoo devs ?
Comment 9 Ed Grimm 2004-02-06 21:51:14 UTC
Yes, I know just what kind of maintenance problem this entails, I suspect a number of us do.

You see, the gentoo default install options do not work for everyone, and some of us need to kludge things for lots of packages.  It gives us far more maintenance issues, because we have to futz with it every build.

An alternate idea on this would be to allow us to suspend the build right before 'make', so that we could modify the config by hand.  (Yes, I know, technically speaking, we do have control-Z, but that requires us to actually pay attention to the entire emerge, so that we manage to suspend the build each time we need to.)

(Back when I at least had the illusion of having free time, I tried making a distro around the concept of doing exactly what this request is trying to do.  Unfortunately, I only had the illusion of free time; after five months, I'd only managed to put about 8 hours into it.)
Comment 10 Brian Harring (RETIRED) gentoo-dev 2005-02-27 21:49:44 UTC
EXTRA_ECONF provides similar functionality... Beyond that, this is particularly nasty from the standpoint of ensuring a pkg's configure options match out to it's USE controlled rdepends.

That would need to be addressed... Better question, what exactly do you need, that requires the ability to basically mangle critical sections of an ebuild?
Meanwhile, slapping this shut due to EXTRA_ECONF... still would like to know exactly what you're attempting, since a better solution might be available/doable/preferable.