summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-06-22 20:54:07 -0700
committerZac Medico <zmedico@gentoo.org>2010-06-22 20:54:07 -0700
commitf006bd04d9bc7ea29c0da7801b9ba567601df263 (patch)
tree56f2f1d09f0e706d4e01afa19269a3804644689e
parentd6c48f4a7adb1918e2b1e0ecc69f7e9fe932bd57 (diff)
downloadportage-f006bd04d9bc7ea29c0da7801b9ba567601df263.tar.gz
portage-f006bd04d9bc7ea29c0da7801b9ba567601df263.tar.bz2
portage-f006bd04d9bc7ea29c0da7801b9ba567601df263.zip
Add a --portdir option, requested by Daniel Robbins.
-rwxr-xr-xbin/egencache6
-rw-r--r--man/egencache.13
2 files changed, 9 insertions, 0 deletions
diff --git a/bin/egencache b/bin/egencache
index fc046b711..c078d98a7 100755
--- a/bin/egencache
+++ b/bin/egencache
@@ -62,6 +62,9 @@ def parse_args(args):
action="store",
help="max load allowed when spawning multiple jobs",
dest="load_average")
+ parser.add_option("--portdir",
+ help="override the portage tree location",
+ dest="portdir")
parser.add_option("--rsync",
action="store_true",
help="enable rsync stat collision workaround " + \
@@ -292,6 +295,9 @@ def egencache_main(args):
if options.cache_dir is not None:
env['PORTAGE_DEPCACHEDIR'] = options.cache_dir
+ if options.portdir is not None:
+ env['PORTDIR'] = options.portdir
+
settings = portage.config(config_root=config_root,
target_root='/', local_config=False, env=env)
diff --git a/man/egencache.1 b/man/egencache.1
index 78b9c17e5..84a60b95e 100644
--- a/man/egencache.1
+++ b/man/egencache.1
@@ -44,6 +44,9 @@ The name should correspond the value of a \fBrepo_name\fR entry (see
\fBportage\fR(5)) from one of the repositories that is configured via the
\fBPORTDIR\fR or \fBPORTDIR_OVERLAY\fR variables (see \fBmake.conf\fR(5)).
.TP
+.BR "\-\-portdir=PORTDIR"
+Override the portage tree location.
+.TP
.BR "\-\-rsync"
When used together with the \fB\-\-update\fR action, this enables a workaround
for cases in which the content of a cache entry changes and neither the file