Add a --root option that sets $ROOT (complements the --config-root option).
authorZac Medico <zmedico@gentoo.org>
Thu, 30 Apr 2009 06:47:20 +0000 (06:47 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 30 Apr 2009 06:47:20 +0000 (06:47 -0000)
(trunk r13246)

svn path=/main/branches/2.1.6/; revision=13425

man/emerge.1
pym/_emerge/__init__.py

index bccb0ed35f7673d6ac234cfc6b57bade3abe28ac..c5aff973f0c24239975f89597963b4082fdd82a5 100644 (file)
@@ -424,6 +424,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
@@ -485,7 +488,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
index 2fb51be78d2168669a0bc243f877987cef77c6dd..75f3724c4beee6bfcfdb29c0660e261b630018ee 100644 (file)
@@ -14445,7 +14445,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
@@ -14838,6 +14842,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)