General logging and code cleanups
This commit is contained in:
parent
2201cca398
commit
1951efca45
10
bin/delpkg
10
bin/delpkg
@ -45,13 +45,13 @@ def del_pkgfiles(cachedir, pkgs):
|
|||||||
:param pkgs: names of packages to remove
|
:param pkgs: names of packages to remove
|
||||||
:type pkgs: any container object
|
:type pkgs: any container object
|
||||||
"""
|
"""
|
||||||
syslog.info('Removing package files from cachedir')
|
syslog.info(f"Removing package files from {cachedir}")
|
||||||
syslog.debug(f"Cache directory: {cachedir}")
|
|
||||||
syslog.debug(f"Packages: {pkgs}")
|
syslog.debug(f"Packages: {pkgs}")
|
||||||
|
|
||||||
# TODO separate list for sigfiles
|
|
||||||
for pkg in pkgs:
|
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()
|
pkgfile.unlink()
|
||||||
syslog.info(f"Removed {pkgfile}")
|
syslog.info(f"Removed {pkgfile}")
|
||||||
|
|
||||||
@ -124,7 +124,7 @@ if __name__ == '__main__':
|
|||||||
if args.verbose:
|
if args.verbose:
|
||||||
stdout_handler.setLevel(logging.DEBUG)
|
stdout_handler.setLevel(logging.DEBUG)
|
||||||
|
|
||||||
del_pkgfiles(repo, pkgs)
|
del_pkgfiles(cachedir, pkgs)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
repo_remove(repo, pkgs, opts)
|
repo_remove(repo, pkgs, opts)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user