diff options
-rw-r--r-- | man/emerge.1 | 6 | ||||
-rw-r--r-- | pym/_emerge/__init__.py | 8 |
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) |