]> git.decadent.org.uk Git - dak.git/commitdiff
daklib/changes.py: handle Dinstall::SuiteSuffix
authorAnsgar Burchardt <ansgar@debian.org>
Sat, 26 Mar 2011 15:01:47 +0000 (15:01 +0000)
committerAnsgar Burchardt <ansgar@debian.org>
Sat, 26 Mar 2011 15:02:14 +0000 (15:02 +0000)
Signed-off-by: Ansgar Burchardt <ansgar@debian.org>
daklib/changes.py

index 54adb3b06b4d091a0134df5eff7820daee2ba466..48da0e580ae5c62ef4fa36b592a05601bd928f7d 100644 (file)
@@ -190,8 +190,13 @@ class Changes(object):
     def __get_file_from_pool(self, filename, entry, session):
         cnf = Config()
 
-        poolname = poolify(entry["source"], entry["component"])
-        l = get_location(cnf["Dir::Pool"], entry["component"], session=session)
+        if cnf.has_key("Dinstall::SuiteSuffix"):
+            component = cnf["Dinstall::SuiteSuffix"] + entry["component"]
+        else:
+            component = entry["component"]
+
+        poolname = poolify(entry["source"], component)
+        l = get_location(cnf["Dir::Pool"], component, session=session)
 
         found, poolfile = check_poolfile(os.path.join(poolname, filename),
                                          entry['size'],
@@ -200,14 +205,14 @@ class Changes(object):
                                          session=session)
 
         if found is None:
-            Logger.log(["E: Found multiple files for pool (%s) for %s" % (chg_fn, entry["component"])])
+            Logger.log(["E: Found multiple files for pool (%s) for %s" % (filename, component)])
             return None
         elif found is False and poolfile is not None:
-            Logger.log(["E: md5sum/size mismatch for %s in pool" % (chg_fn)])
+            Logger.log(["E: md5sum/size mismatch for %s in pool" % (filename)])
             return None
         else:
             if poolfile is None:
-                Logger.log(["E: Could not find %s in pool" % (chg_fn)])
+                Logger.log(["E: Could not find %s in pool" % (filename)])
                 return None
             else:
                 return poolfile