From 1951efca45d6a816738c176a79b32ce50beaf53c Mon Sep 17 00:00:00 2001 From: Eric Torres Date: Mon, 28 Jan 2019 21:13:36 -0800 Subject: [PATCH] General logging and code cleanups --- bin/delpkg | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/delpkg b/bin/delpkg index 88a3fa3..7afacc9 100644 --- a/bin/delpkg +++ b/bin/delpkg @@ -45,13 +45,13 @@ def del_pkgfiles(cachedir, pkgs): :param pkgs: names of packages to remove :type pkgs: any container object """ - syslog.info('Removing package files from cachedir') - syslog.debug(f"Cache directory: {cachedir}") + syslog.info(f"Removing package files from {cachedir}") syslog.debug(f"Packages: {pkgs}") - # TODO separate list for sigfiles for pkg in pkgs: - for pkgfile in pkgfiles.get_pkgfiles(pkg, directory=cachedir): + for pkgfile in pkgfiles.get_pkgfiles(pkg, directory=cachedir) +\ + pkgfiles.get_pkgfiles(pkg, directory=cachedir, + signatures_only=True): pkgfile.unlink() syslog.info(f"Removed {pkgfile}") @@ -124,7 +124,7 @@ if __name__ == '__main__': if args.verbose: stdout_handler.setLevel(logging.DEBUG) - del_pkgfiles(repo, pkgs) + del_pkgfiles(cachedir, pkgs) try: repo_remove(repo, pkgs, opts)