From 593ace1786a4e24f1a8130c8d0d8a4bf5bd3e898 Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Tue, 23 Jan 2024 14:05:00 -0800 Subject: Don't delete empty placeholder directories Even if 9/nonfree/backports_testing/ hasn't had any builds recently, it shouldn't be deleted. Only delete directories deeper in the hierarchy. Follow-up to f7e017e8 --- modules/buildsystem/manifests/scheduler.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/buildsystem/manifests/scheduler.pp b/modules/buildsystem/manifests/scheduler.pp index cacae1e7..11780312 100644 --- a/modules/buildsystem/manifests/scheduler.pp +++ b/modules/buildsystem/manifests/scheduler.pp @@ -47,7 +47,7 @@ class buildsystem::scheduler { # at ctime instead of mtime, which resets every time a file/directory # underneath it is deleted. Directories don't take much space, so this # shouldn't be a real issue. - command => sprintf("/usr/bin/find %s/uploads -ignore_readdir_race -xdev -depth -type d -ctime +14 -empty >/var/lib/schedbot/clean-uploads-dirs-test.log 2>&1", shellquote($homedir)), + command => sprintf("/usr/bin/find %s/uploads -ignore_readdir_race -mindepth 5 -xdev -depth -type d -ctime +14 -empty >/var/lib/schedbot/clean-uploads-dirs-test.log 2>&1", shellquote($homedir)), hour => '*/1', minute => '53', } -- cgit v1.2.1