aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatarLuca Capello <luca@pca.it>2009-07-20 17:06:58 +0200
committerLibravatarChristoph Goehre <christoph.goehre@gmx.de>2009-07-23 22:39:10 +0200
commit9017b45286fa5da3e648c934c133bc13c1444dcc (patch)
tree8d716598413037c54e7950f738142e0459dddb28
parent364119c01fb83ed0d5175b1fd566d8e651f63222 (diff)
support distribution aliases
Closes: #291340 Signed-off-by: Christoph Goehre <christoph.goehre@gmx.de>
-rw-r--r--doc/mini-dinstall.13
-rw-r--r--doc/mini-dinstall.conf3
-rwxr-xr-xmini-dinstall10
3 files changed, 15 insertions, 1 deletions
diff --git a/doc/mini-dinstall.1 b/doc/mini-dinstall.1
index a068a05..5973a29 100644
--- a/doc/mini-dinstall.1
+++ b/doc/mini-dinstall.1
@@ -190,6 +190,9 @@ the debian\-keyring package is installed, disabled otherwise.
The configuration parameters that can be set in the \fBDEFAULT\fR section and
the distribution-specific sections are:
.TP
+.B alias
+A list of alternative distribution names.
+.TP
.B architectures
A list of architectures to create subdirectories for. Defaults to \*(lqall, i386,
powerpc, sparc\*(rq.
diff --git a/doc/mini-dinstall.conf b/doc/mini-dinstall.conf
index a0d7f9b..0c8d372 100644
--- a/doc/mini-dinstall.conf
+++ b/doc/mini-dinstall.conf
@@ -45,6 +45,9 @@ incoming_permissions = 0750
### The remaining options can also be specified in a per-distribution
### basis
+# Alternative distribution names.
+alias = sid
+
# What architecture subdirectories to create.
architectures = all, i386, sparc, powerpc
diff --git a/mini-dinstall b/mini-dinstall
index de75c99..1c1d2d1 100755
--- a/mini-dinstall
+++ b/mini-dinstall
@@ -347,6 +347,7 @@ class DistOptionHandler:
self._configp = configp
self._distributions = distributions
self._optionmap = {}
+ self._optionmap['alias'] = ['str', None]
self._optionmap['poll_time'] = ['int', default_poll_time]
# two days
self._optionmap['max_retry_time'] = ['int', default_max_retry_time]
@@ -551,7 +552,14 @@ class IncomingDir(threading.Thread):
return 1
def _install_changefile(self, changefilename, changefile, doing_reprocess):
- dist = changefile['distribution']
+ changefiledist = changefile['distribution']
+ for dist in distributions.keys():
+ distributions[dist] = distoptionhandler.get_option_map(dist)
+ if distributions[dist].has_key('alias') and changefiledist in distributions[dist]['alias']:
+ logger.info('Distribution "%s" is an alias for "%s"' % (changefiledist, dist))
+ break
+ else:
+ dist = changefiledist
if not dist in self._archivemap.keys():
raise DinstallException('Unknown distribution "%s" in \"%s\"' % (dist, changefilename,))
logger.debug('Installing %s in archive %s' % (changefilename, self._archivemap[dist][1].getName()))