jw.pkg.App: Remove .debug() and friends

Replace the jw.pkg.App.debug(), .warn() and .err() methods by the
global log() function. There's no obvious benefit in having App know
what's logged.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-01-25 15:18:27 +01:00
commit 95fa2f0d06
8 changed files with 39 additions and 41 deletions

View file

@ -3,6 +3,7 @@
import re
from argparse import Namespace, ArgumentParser
from ...lib.log import *
from ..Cmd import Cmd
class BaseCmdPkgRelations(Cmd):
@ -14,9 +15,9 @@ class BaseCmdPkgRelations(Cmd):
subsecs.append('jw')
else:
subsecs = args.subsections.split(',')
self.app.debug('flavour = ', args.flavour, ', subsecs = ', ' '.join(subsecs))
log(DEBUG, 'flavour = ', args.flavour, ', subsecs = ', ' '.join(subsecs))
ignore = args.ignore.split(',')
self.app.debug("ignore = ", ignore)
log(DEBUG, "ignore = ", ignore)
r = []
flavours = args.flavour.split(',')
@ -68,7 +69,7 @@ class BaseCmdPkgRelations(Cmd):
raise Exception("Unknown version specifier in " + spec)
cleaned_dep = ' '.join(dep)
if not cleaned_dep in r:
self.app.debug("appending", cleaned_dep)
log(DEBUG, "appending", cleaned_dep)
r.append(cleaned_dep)
return args.delimiter.join(r)