From 116d1a8adb2505f4a418997e5fc8314d8cb7b710 Mon Sep 17 00:00:00 2001 From: Julien Cristau Date: Wed, 18 May 2016 16:10:01 +0200 Subject: [PATCH] clean_suites: fix clean_byhash when Dinstall::SuiteSuffix is set Signed-off-by: Julien Cristau --- 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 ac354371..314c6121 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.39.2