tags 291340 + patch thanks Hi there!
On Thu, 20 Jan 2005 07:51:32 +0100, Julien Goodwin wrote: > So in the config file there could be: > ... > [sid] > alias=unstable > ... > > And when a package was uploaded with distribution=unstable it would be > able to do the right thing. Attached the DebConf9 patch I use for http://p.d.o/~gismo/debian/ (thanks Zack [1]). The patch was tested with mini-dinstall_0.6.25 and then ported to the Git repository. Thx, bye, Gismo / Luca Footnotes: [1] http://upsilon.cc/~zack/blog/posts/2009/04/howto:_uploading_to_people.d.o_using_dput/
From b0cbf14c17c5b87911b2f26e992e5c7f83716c3f Mon Sep 17 00:00:00 2001 From: Luca Capello <l...@pca.it> Date: Mon, 20 Jul 2009 17:06:58 +0200 Subject: [PATCH] support distribution aliases Closes: #291340 --- doc/mini-dinstall.1 | 3 +++ doc/mini-dinstall.conf | 3 +++ 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())) -- 1.6.3.3
pgpuFczStwwmg.pgp
Description: PGP signature