diff options
author | Guido Guenther <agx@sigxcpu.org> | 2008-08-29 19:41:00 +0200 |
---|---|---|
committer | Christoph Goehre <christoph.goehre@gmx.de> | 2008-08-31 11:00:01 +0200 |
commit | 540ebcf6e80402f8f5bcf157f7c75e4eff27e94d (patch) | |
tree | a3da38de4f07e795b3a66e43752e6e1b6f2a1aab | |
parent | 9091830fafb2b6512ed5cd18c527109dffc548c9 (diff) | |
download | mini-dinstall-540ebcf6e80402f8f5bcf157f7c75e4eff27e94d.tar.bz2 mini-dinstall-540ebcf6e80402f8f5bcf157f7c75e4eff27e94d.tar.xz mini-dinstall-540ebcf6e80402f8f5bcf157f7c75e4eff27e94d.tar.zst |
[PATCH] allow keyrings and extra_keyrings per repository
this allows for fine grained permissions, like key 0x... is only allowed to
upload into the experimental archive.
Signed-off-by: Christoph Goehre <christoph.goehre@gmx.de>
-rwxr-xr-x | mini-dinstall | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/mini-dinstall b/mini-dinstall index 08f1ffc..66e54d2 100755 --- a/mini-dinstall +++ b/mini-dinstall @@ -365,6 +365,8 @@ class DistOptionHandler: self._optionmap['experimental_release'] = ['bool', 0] self._optionmap['release_description'] = ['str', None] self._optionmap['release_signscript'] = ['str', None] + self._optionmap['keyrings'] = ['list', None] + self._optionmap['extra_keyrings'] = ['list', None] def get_option_map(self, dist): ret = self._distributions[dist] @@ -382,9 +384,10 @@ class DistOptionHandler: return self._configp.getint(dist, key) elif type == 'str': return self._configp.get(dist, key) + elif type == 'list': + return re.split(', ?', self._configp.get(dist, key)) elif type == 'bool': return self._configp.getboolean(dist, key) - assert(None) @@ -711,8 +714,13 @@ class ArchiveDir: self.__dict__['_' + key] = configdict[key] do_mkdir(dir) self._batch_mode = batch_mode - self._keyrings = keyrings - if not extra_keyrings is None : + if configdict['keyrings']: + self._keyrings = configdict['keyrings'] + else: + self._keyrings = keyrings + if configdict['extra_keyrings']: + self._extra_keyrings = configdict['extra_keyrings'] + elif extra_keyrings: self._extra_keyrings = extra_keyrings else: self._extra_keyrings = [] |