aboutsummaryrefslogtreecommitdiffstats
path: root/mini-dinstall
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 /mini-dinstall
parent364119c01fb83ed0d5175b1fd566d8e651f63222 (diff)
support distribution aliases
Closes: #291340 Signed-off-by: Christoph Goehre <christoph.goehre@gmx.de>
Diffstat (limited to 'mini-dinstall')
-rwxr-xr-xmini-dinstall10
1 files changed, 9 insertions, 1 deletions
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()))