Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 20233 - Extend portage-2.0.47-r10 to understand ". file" syntax in configuration files
Summary: Extend portage-2.0.47-r10 to understand ". file" syntax in configuration files
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All All
: High enhancement (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: Inclusion
: 20232 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-04-30 15:07 UTC by Dave Love
Modified: 2004-04-13 18:16 UTC (History)
0 users

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


Attachments
Patch which adds '. file' support to portage.py (portage.py.patch,486 bytes, patch)
2003-04-30 17:20 UTC, Dave Love
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dave Love 2003-04-30 15:19:16 UTC
This is a very short patch (it adds 5 lines) to portage.py that adds
support for sourcing files (". file") from within configuration files.

Reason:  Merging configuration files after a portage update has proved
to be both painful and fraught with error (I've lost my USE settings 
before by screwing up the merge).  This patch allowed me to move the
settings I want to override to their own file, and simply include that
file in portage's file.

For example, I've copied the settings I want to override in /etc/make.conf
-- USE, CFLAGS, etc. -- to /etc/my.make.conf.  The only change I need to 
make to an updated  /etc/make.conf is to add the single line
". /etc/my.make.conf" to the end of it.  Merges are now trivial 
and my settings are always safe.

The only point of caution here is that variables are expanded
immediately upon reference.  This implies that given 
CXXFLAGS="${CFLAGS}" in make.conf, then if CFLAGS is subsequently 
redefined in my.make.conf, CXXFLAGS also needs to be redefined 
in my.make.conf.  In practice, this hasn't been a problem.


Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 SpanKY gentoo-dev 2003-04-30 16:03:47 UTC
*** Bug 20232 has been marked as a duplicate of this bug. ***
Comment 2 Dave Love 2003-04-30 17:20:49 UTC
Created attachment 11334 [details, diff]
Patch which adds '. file' support to portage.py
Comment 3 Marius Mauch (RETIRED) gentoo-dev 2004-02-09 01:45:17 UTC
I'd rather use "source filename" instead of ". filename" for readability (patch still applies to 2.0.50, very rare these days).
Comment 4 Nicholas Jones (RETIRED) gentoo-dev 2004-04-13 18:16:23 UTC
Not a bad idea, but no longer relevant.
Portage doesn't overwrite that config any longer.