From 5b32d768655f1e0053511bf7462aa10d7edf38f1 Mon Sep 17 00:00:00 2001 From: Mike McLean Date: Nov 15 2021 08:07:01 +0000 Subject: rework a bit --- diff --git a/util/kojira b/util/kojira index 5dd5091..49bbc90 100755 --- a/util/kojira +++ b/util/kojira @@ -256,6 +256,10 @@ class ManagedRepo(object): if not os.path.exists(realpath): logger.error('Repo real path missing: %s', realpath) return False + if self.options.ignore_other_volumes: + # don't delete from other volumes + logger.error('Repo on non-default volume %s', realpath) + return False if not os.path.samefile(path, realpath): logger.error('Incorrect volume link: %s', path) return False @@ -641,6 +645,11 @@ class RepoManager(object): for volinfo in self.session.listVolumes(): volname = volinfo['name'] + if volname == 'DEFAULT': + continue + if self.options.ignore_other_volumes: + # don't prune from other volumes + continue volumedir = pathinfo.volumedir(volname) distrepodir = "%s/repos-dist" % volumedir self._pruneLocalRepos(distrepodir, self.options.dist_repo_lifetime)