[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[dak/master] clean_suites: fix clean_byhash when Dinstall::SuiteSuffix is set



Signed-off-by: Julien Cristau <jcristau@debian.org>
---
 dak/clean_suites.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/dak/clean_suites.py b/dak/clean_suites.py
index ac35437..314c612 100755
--- a/dak/clean_suites.py
+++ b/dak/clean_suites.py
@@ -386,6 +386,9 @@ SELECT f.id, f.fingerprint FROM fingerprint f
 ################################################################################
 
 def clean_byhash(now_date, session):
+    cnf = Config()
+    suite_suffix = cnf.find("Dinstall::SuiteSuffix", "")
+
     Logger.log(["Cleaning out unused by-hash files..."])
 
     q = session.execute("""
@@ -399,7 +402,7 @@ def clean_byhash(now_date, session):
 
     if not Options["No-Action"]:
         for base, suite, path in q:
-            filename = os.path.join(base, 'dists', suite, path)
+            filename = os.path.join(base, 'dists', suite, suite_suffix, path)
             try:
                 os.unlink(filename)
             except OSError as exc:
-- 
2.1.4



Reply to: