diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-10-06 06:57:06 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-10-06 06:57:06 +0000 |
commit | 23b2d39e7dd8de9bc78b4ad7fe35e820b27f9eba (patch) | |
tree | 6608bb3ff0970c695d9bde9159d2f8dec0ddf85d /pym/_emerge/main.py | |
parent | daff4f017cbe9d14f147d0f7d46eef9ac776be49 (diff) | |
download | portage-23b2d39e7dd8de9bc78b4ad7fe35e820b27f9eba.tar.gz portage-23b2d39e7dd8de9bc78b4ad7fe35e820b27f9eba.tar.bz2 portage-23b2d39e7dd8de9bc78b4ad7fe35e820b27f9eba.zip |
Add a new --accept-properties option so that users can temporarily override
ACCEPT_PROPERTIES on the commandline, without relying on emerge's legacy
behavior of allowing variables to leak in from the calling environment.
A typical usage example for this option would be to use
--accept-properties=-interactive to temporarily mask interactive packages.
With default configuration, this would result in an effective
ACCEPT_PROPERTIES value of "* -interactive".
svn path=/main/trunk/; revision=14501
Diffstat (limited to 'pym/_emerge/main.py')
-rw-r--r-- | pym/_emerge/main.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py index 777d10192..4635cdaf2 100644 --- a/pym/_emerge/main.py +++ b/pym/_emerge/main.py @@ -498,6 +498,10 @@ def parse_opts(tmpcmdline, silent=False): longopt_aliases = {"--cols":"--columns", "--skip-first":"--skipfirst"} argument_options = { + "--accept-properties": { + "help":"temporarily override ACCEPT_PROPERTIES", + "action":"store" + }, "--config-root": { "help":"specify the location for portage configuration files", "action":"store" @@ -1047,6 +1051,8 @@ def emerge_main(): os.environ["PORTAGE_CONFIGROOT"] = myopts["--config-root"] if "--root" in myopts: os.environ["ROOT"] = myopts["--root"] + if "--accept-properties" in myopts: + os.environ["ACCEPT_PROPERTIES"] = myopts["--accept-properties"] # Portage needs to ensure a sane umask for the files it creates. os.umask(0o22) |