summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-03-29 19:26:50 +0000
committerZac Medico <zmedico@gentoo.org>2009-03-29 19:26:50 +0000
commit1c818a0918f7162e803477055e9de2b87d23327f (patch)
treede4c7deb4713df4a2f074f6b9cd323a08209cbd2
parent7ba9d8dd2a0da019c16341197b52a14ac6eff9da (diff)
downloadportage-1c818a0918f7162e803477055e9de2b87d23327f.tar.gz
portage-1c818a0918f7162e803477055e9de2b87d23327f.tar.bz2
portage-1c818a0918f7162e803477055e9de2b87d23327f.zip
Add a --root option that sets $ROOT (complements the --config-root option).
svn path=/main/trunk/; revision=13246
-rw-r--r--man/emerge.16
-rw-r--r--pym/_emerge/__init__.py8
2 files changed, 12 insertions, 2 deletions
diff --git a/man/emerge.1 b/man/emerge.1
index 60e15338f..7a82a91bd 100644
--- a/man/emerge.1
+++ b/man/emerge.1
@@ -427,6 +427,9 @@ changed since installation. Unlike \fB\-\-newuse\fR, this option does
not trigger reinstallation when flags that the user has not
enabled are added or removed.
.TP
+.BR \-\-root=DIR
+Set the \fBROOT\fR environment variable.
+.TP
.BR "\-\-root\-deps"
Install build\-time dependencies to \fBROOT\fR instead of /. This option
should not be enabled under normal circumstances. For currently supported
@@ -488,7 +491,8 @@ command line.
.TP
\fBROOT\fR = \fI[path]\fR
Use \fBROOT\fR to specify the target root filesystem to be used for
-merging packages or ebuilds. This variable can be set in \fBmake.conf\fR(5).
+merging packages or ebuilds. This variable can be set via the \fB\-\-root\fR
+option or in \fBmake.conf\fR(5) (the command line overrides other settings).
.br
Defaults to /.
.TP
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index 773ef029c..0a0ab3414 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -14800,7 +14800,11 @@ def parse_opts(tmpcmdline, silent=False):
"help":"specify conditions to trigger package reinstallation",
"type":"choice",
"choices":["changed-use"]
- }
+ },
+ "--root": {
+ "help" : "specify the target root filesystem for merging packages",
+ "action" : "store"
+ },
}
from optparse import OptionParser
@@ -15325,6 +15329,8 @@ def emerge_main():
os.environ["PORTAGE_DEBUG"] = "1"
if "--config-root" in myopts:
os.environ["PORTAGE_CONFIGROOT"] = myopts["--config-root"]
+ if "--root" in myopts:
+ os.environ["ROOT"] = myopts["--root"]
# Portage needs to ensure a sane umask for the files it creates.
os.umask(022)