common = optparse.OptionGroup(parser, 'Common options')
common.add_option("--repo",
action="store",
- help="name of repo to operate on (default repo is located at $PORTDIR)")
+ help="name of repo to operate on")
common.add_option("--config-root",
help="location of portage config files",
dest="portage_configroot")
help="override the portage tree location (deprecated in favor of --repositories-configuration)",
dest="portdir")
common.add_option("--portdir-overlay",
- help="override the PORTDIR_OVERLAY variable (requires that --repo is also specified) (deprecated in favor of --repositories-configuration)",
+ help="override the PORTDIR_OVERLAY variable (deprecated in favor of --repositories-configuration)",
dest="portdir_overlay")
common.add_option("--repositories-configuration",
- help="override configuration of repositories (in format of repos.conf) (requires that --repo is also specified)",
+ help="override configuration of repositories (in format of repos.conf)",
dest="repositories_configuration")
common.add_option("--sign-manifests",
type="choice",
(options.cache_dir,))
if options.repo is None:
- if options.repositories_configuration is not None:
- parser.error("--repositories-configuration option requires --repo option")
- if options.portdir_overlay is not None:
- parser.error("--portdir-overlay option requires --repo option")
+ parser.error("--repo option is required")
for atom in args:
try:
config_root = options.config_root
- if options.repo is None:
- env['PORTDIR_OVERLAY'] = ''
- elif options.repositories_configuration is not None:
+ if options.repositories_configuration is not None:
env['PORTAGE_REPOSITORIES'] = options.repositories_configuration
elif options.portdir_overlay:
env['PORTDIR_OVERLAY'] = options.portdir_overlay
parser.error('No action specified')
return 1
- repo_path = None
- if options.repo is not None:
- repo_path = settings.repositories.treemap.get(options.repo)
- if repo_path is None:
- parser.error("Unable to locate repository named '%s'" % \
- (options.repo,))
- return 1
- else:
- repo_path = settings.repositories.mainRepoLocation()
- if not repo_path:
- parser.error("PORTDIR is undefined")
- return 1
+ repo_path = settings.repositories.treemap.get(options.repo)
+ if repo_path is None:
+ parser.error("Unable to locate repository named '%s'" % (options.repo,))
+ return 1
repo_config = settings.repositories.get_repo_for_location(repo_path)
\-\-repositories\-configuration option.
.TP
.BR "\-\-portdir\-overlay=PORTDIR_OVERLAY"
-Override the PORTDIR_OVERLAY variable (requires that
-\-\-repo is also specified). This option is deprecated in favor of
+Override the PORTDIR_OVERLAY variable. This option is deprecated in favor of
\-\-repositories\-configuration option.
.TP
.BR "\-\-preserve\-comments"
the output file to exist before egencache is called.
.TP
.BR "\-\-repo=REPO"
-Name of the repo to operate on (default repo is located at \fBPORTDIR\fR).
-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)).
+Name of the repo to operate on. The name should correspond the value of
+a \fBrepo_name\fR entry (see \fBportage\fR(5)) from one of the repositories.
.TP
.BR "\-\-repositories\-configuration=REPOSITORIES_CONFIGURATION"
Override configuration of repositories. The argument of this option has
.SH "AUTHORS"
.nf
Zac Medico <zmedico@gentoo.org>
+Arfrever Frehtes Taifersar Arahesis <arfrever@apache.org>
.fi
.SH "FILES"
.TP