aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-08-13 13:51:43 (GMT)
committerZac Medico <zmedico@gentoo.org>2011-08-13 13:51:43 (GMT)
commit38bbbfaeac507a3ee030c73428b9af5b60ec425b (patch)
treea6c82dc89f4cdd2d235bab53bbf7ece35a77dea3
parentconfig: blacklist vars loaded from profile.env (diff)
downloadportage-38bbbfaeac507a3ee030c73428b9af5b60ec425b.zip
portage-38bbbfaeac507a3ee030c73428b9af5b60ec425b.tar.gz
portage-38bbbfaeac507a3ee030c73428b9af5b60ec425b.tar.bz2
egencache: add --portdir-overlay option
This will fix bug #353648.
-rwxr-xr-xbin/egencache9
-rw-r--r--man/egencache.14
2 files changed, 13 insertions, 0 deletions
diff --git a/bin/egencache b/bin/egencache
index 1b4265d..6d8df35 100755
--- a/bin/egencache
+++ b/bin/egencache
@@ -87,6 +87,9 @@ def parse_args(args):
common.add_option("--portdir",
help="override the portage tree location",
dest="portdir")
+ common.add_option("--portdir-overlay",
+ help="override the PORTDIR_OVERLAY variable (requires that --repo is also specified)",
+ dest="portdir_overlay")
common.add_option("--tolerant",
action="store_true",
help="exit successfully if only minor errors occurred")
@@ -164,6 +167,10 @@ def parse_args(args):
parser.error("Not a directory: --cache-dir='%s'" % \
(options.cache_dir,))
+ if options.portdir_overlay is not None and \
+ options.repo is None:
+ parser.error("--portdir-overlay option requires --repo option")
+
for atom in args:
try:
atom = portage.dep.Atom(atom)
@@ -764,6 +771,8 @@ def egencache_main(args):
if options.repo is None:
env['PORTDIR_OVERLAY'] = ''
+ elif options.portdir_overlay:
+ env['PORTDIR_OVERLAY'] = options.portdir_overlay
if options.cache_dir is not None:
env['PORTAGE_DEPCACHEDIR'] = options.cache_dir
diff --git a/man/egencache.1 b/man/egencache.1
index 56c2602..9094595 100644
--- a/man/egencache.1
+++ b/man/egencache.1
@@ -47,6 +47,10 @@ Specifies that maximum load allowed when spawning multiple jobs.
.BR "\-\-portdir=PORTDIR"
Override the portage tree location.
.TP
+.BR "\-\-portdir\-overlay=PORTDIR_OVERLAY"
+Override the PORTDIR_OVERLAY variable (requires that
+\-\-repo is also specified).
+.TP
.BR "\-\-preserve\-comments"
Preserve the comments found in the output use.local.desc file. This requires
the output file to exist before egencache is called.