-.TH "EMIRRORDIST" "1" "Jan 2013" "Portage VERSION" "Portage"
+.TH "EMIRRORDIST" "1" "Jul 2013" "Portage VERSION" "Portage"
.SH "NAME"
emirrordist \- a fetch tool for mirroring of package distfiles
.SH SYNOPSIS
(default is 10).
.TP
\fB\-\-repo\fR=\fIREPO\fR
-Name of repo to operate on (default repo is located at
-$PORTDIR).
+Name of repo to operate on.
.TP
\fB\-\-config\-root\fR=\fIDIR\fR
Location of portage config files.
.TP
\fB\-\-portdir\fR=\fIDIR\fR
-Override the portage tree location.
+Override the PORTDIR variable. This option is deprecated in favor of
+\-\-repositories\-configuration option.
.TP
\fB\-\-portdir\-overlay\fR=\fIPORTDIR_OVERLAY\fR
-Override the PORTDIR_OVERLAY variable (requires that
-\fI\-\-repo\fR is also specified).
+Override the PORTDIR_OVERLAY variable. This option is deprecated in favor of
+\-\-repositories\-configuration option.
+.TP
+\fB\-\-repositories\-configuration=REPOSITORIES_CONFIGURATION\fR=\fIREPOSITORIES_CONFIGURATION\fR
+Override configuration of repositories. The argument of this option has
+the same format as repos.conf (see \fBportage\fR(5)).
.TP
\fB\-\-strict\-manifests=\fR<y|n>
Manually override "strict" FEATURES setting.
.SH "AUTHORS"
.nf
Zac Medico <zmedico@gentoo.org>
+Arfrever Frehtes Taifersar Arahesis <arfrever@apache.org>
.fi
.SH "FILES"
.TP
import portage
from portage import os
-from portage.util import normalize_path
+from portage.util import normalize_path, writemsg_level
from portage.util._async.run_main_scheduler import run_main_scheduler
from portage.util._async.SchedulerInterface import SchedulerInterface
from portage.util._eventloop.global_event_loop import global_event_loop
},
{
"longopt" : "--repo",
- "help" : "name of repo to operate on (default repo is located at $PORTDIR)"
+ "help" : "name of repo to operate on"
},
{
"longopt" : "--config-root",
},
{
"longopt" : "--portdir",
- "help" : "override the portage tree location",
+ "help" : "override the PORTDIR variable (deprecated in favor of --repositories-configuration)",
"metavar" : "DIR"
},
{
"longopt" : "--portdir-overlay",
- "help" : "override the PORTDIR_OVERLAY variable (requires "
- "that --repo is also specified)"
+ "help" : "override the PORTDIR_OVERLAY variable (deprecated in favor of --repositories-configuration)"
+ },
+ {
+ "longopt" : "--repositories-configuration",
+ "help" : "override configuration of repositories (in format of repos.conf)"
},
{
"longopt" : "--strict-manifests",
config_root = options.config_root
if options.repo is None:
- env['PORTDIR_OVERLAY'] = ''
+ parser.error("--repo option is required")
+
+ if options.portdir is not None:
+ writemsg_level("emirrordist: warning: --portdir option is deprecated in favor of --repositories-configuration option\n",
+ level=logging.WARNING, noiselevel=-1)
+ if options.portdir_overlay is not None:
+ writemsg_level("emirrordist: warning: --portdir-overlay option is deprecated in favor of --repositories-configuration option\n",
+ level=logging.WARNING, noiselevel=-1)
+
+ if options.repositories_configuration is not None:
+ env['PORTAGE_REPOSITORIES'] = options.repositories_configuration
elif options.portdir_overlay:
env['PORTDIR_OVERLAY'] = options.portdir_overlay
settings = portage.config(config_root=config_root,
local_config=False, env=env)
- 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,))
- else:
- repo_path = settings.repositories.mainRepoLocation()
- if not repo_path:
- parser.error("PORTDIR is undefined")
+ repo_path = settings.repositories.treemap.get(options.repo)
+ if repo_path is None:
+ parser.error("Unable to locate repository named '%s'" % (options.repo,))
if options.jobs is not None:
options.jobs = int(options.jobs)