Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 229861 - Support conditional statements in make.conf
Summary: Support conditional statements in make.conf
Status: RESOLVED LATER
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Enhancement/Feature Requests (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-28 02:38 UTC by Thomas Kear
Modified: 2012-03-15 20:44 UTC (History)
1 user (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 Thomas Kear 2008-06-28 02:38:55 UTC
My current main gentoo machine is a laptop, as such I have found it necessary to have different make.conf features depending on the location I am using it.
At work I have another machine sharing its distfiles and portage tree as well as a small compile cluster so I set SYNC, GENTOO_MIRRORS, PREROOTPATH, and MAKEOPTS using another script sourced from make.conf.

Since I usually forget to uncomment the line to enable this, it would simplify matters if make.conf had support for conditional statements, so for instance I could use something like this to set these variables automatically when my pc is plugged into the LAN: (example in shell syntax for simplicity)

if ifconfig eth0 | grep -q '10.0.10.58'; then
  source /etc/make.conf.work
fi
Comment 1 Marius Mauch (RETIRED) gentoo-dev 2008-06-28 12:59:38 UTC
This isn't supported by the underlying parser module, so we'd have to implement/find a completely new parser, which won't happen anytime soon.
Comment 2 Xavier Miller (RETIRED) gentoo-dev 2012-03-15 20:44:58 UTC
Hello,

I have a netbook and for now, I manually edit make.conf when I am at home or not, so that I can use or not the machines at home for DISTCC (+ MAKEOPTS).

The only solution I see now is manually editing or write a wrapper that detects DISTCC servers

somethink like http://forums.gentoo.org/viewtopic-t-371316-start-0-postdays-0-postorder-asc-highlight-.html

So, I vote to add that feature to portage !

Thanks in advance,
Xavier Miller