]> git.decadent.org.uk Git - dak.git/commitdiff
Fix src_uploads in debian maintainers case
authorJoerg Jaspert <joerg@debian.org>
Mon, 21 Apr 2008 10:10:33 +0000 (12:10 +0200)
committerJoerg Jaspert <joerg@debian.org>
Mon, 21 Apr 2008 10:10:33 +0000 (12:10 +0200)
ChangeLog
dak/process_accepted.py

index fb4b205b18184fa92e802252503861798033a16f..a66eca568408b4c4900e91b3dfe77513c5c8516b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-04-21  Joerg Jaspert  <joerg@debian.org>
+
+       * dak/process_accepted.py (install): Do not break if a
+       source/maintainer combination is already in src_uploaders, "just"
+       warn us.
+
 2008-04-20  Thomas Viehmann  <tviehmann@debian.org>
 
        * daklib/utils.py (build_file_list): Deal with "Format 3 style"
index 20aab49515e5af6be63497c7578cd749a0465705..225f7bb0c21b7cb322a8f8e65379aceeb9f45afb 100755 (executable)
@@ -313,12 +313,17 @@ def install ():
             if dsc.get("dm-upload-allowed", "no") == "yes":
                 uploader_ids = [maintainer_id]
                 if dsc.has_key("uploaders"):
-                   for u in dsc["uploaders"].split(","):
-                       u = u.replace("'", "\\'")
-                       u = u.strip()
+                    for u in dsc["uploaders"].split(","):
+                        u = u.replace("'", "\\'")
+                        u = u.strip()
                         uploader_ids.append(
-                           daklib.database.get_or_set_maintainer_id(u))
+                            daklib.database.get_or_set_maintainer_id(u))
+                added_ids = {}
                 for u in uploader_ids:
+                    if added_ids.has_key(u):
+                        daklib.utils.warn("Already saw uploader %s for source %s") % (u, package)
+                        continue
+                    added_ids[u]=1
                     projectB.query("INSERT INTO src_uploaders (source, maintainer) VALUES (currval('source_id_seq'), %d)" % (u))