diff options
| -rw-r--r-- | doc/mini-dinstall.1 | 3 | ||||
| -rw-r--r-- | doc/mini-dinstall.conf | 3 | ||||
| -rwxr-xr-x | mini-dinstall | 10 |
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())) |
