[bts-link] 01/01: Add configurable location for sources package mappings file

Olivier Berger obergix at moszumanska.debian.org
Mon Oct 19 15:02:30 UTC 2015


This is an automated email from the git hooks/post-receive script.

obergix pushed a commit to branch obergix-master
in repository bts-link.

commit bc3f123235922a1fae2143110bccce5c9ecc357a
Author: Olivier Berger <olivier.berger at telecom-sudparis.eu>
Date:   Mon Oct 19 16:56:11 2015 +0200

    Add configurable location for sources package mappings file
---
 bts/interfaces.py | 6 +++---
 btslink.yaml      | 1 +
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/bts/interfaces.py b/bts/interfaces.py
index d999e38..ae497bf 100644
--- a/bts/interfaces.py
+++ b/bts/interfaces.py
@@ -190,11 +190,11 @@ class _BtsLdapInterface:
 class _BtsSpoolInterface:
     """Interface with debbugs using a mirror of its database"""
     
-    def __init__(self, spooldir):
+    def __init__(self, spooldir, sourcesfile):
         self._spool = spooldir
         # mapping between binary and source packages 
         self._map   = {}
-        f = file('/srv/bugs.debian.org/etc/indices/sources')
+        f = file(sourcesfile)
         for l in f.readlines():
             pkg, _, srcpkg = l.split()
             self._map[pkg] = srcpkg
@@ -235,7 +235,7 @@ class _BtsSpoolInterface:
 def BtsInterface(cnf):
     if cnf.get('general', 'spool') is not None:
         _parseUserTags(cnf)
-        return _BtsSpoolInterface(cnf.get('general', 'spool'))
+        return _BtsSpoolInterface(cnf.get('general', 'spool'), cnf.get('general', 'sources'))
     if cnf.get('general', 'ldap') is not None:
         _parseUserTags(cnf)
         return _BtsLdapInterface(cnf.get('general', 'ldap'))
diff --git a/btslink.yaml b/btslink.yaml
index 3bfcffa..cc6d3a8 100644
--- a/btslink.yaml
+++ b/btslink.yaml
@@ -4,6 +4,7 @@ general:
   reply-to: bts-link-devel at lists.alioth.debian.org
   spool: /srv/bugs.debian.org/spool/db-h/
   user: bts-link-upstream at lists.alioth.debian.org
+  sources: /srv/bugs.debian.org/etc/indices/sources
 
 local:
   logdir: /home/morph/bts-link/log

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/bts-link/bts-link.git



More information about the bts-link-commits mailing list