From: Julien Cristau Date: Wed, 18 May 2016 14:10:01 +0000 (+0200) Subject: clean_suites: fix clean_byhash when Dinstall::SuiteSuffix is set X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=116d1a8adb2505f4a418997e5fc8314d8cb7b710;p=dak.git clean_suites: fix clean_byhash when Dinstall::SuiteSuffix is set Signed-off-by: Julien Cristau --- 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: