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

@ -2,6 +2,7 @@
from argparse import Namespace, ArgumentParser
from ...lib.log import *
from ..Cmd import Cmd
# TODO: seems at least partly redundant to CmdPkgRequires / print_pkg_relations
@ -23,7 +24,7 @@ class CmdRequiredOsPkg(Cmd): # export
if 'build' in flavours and not 'run' in flavours:
# TODO: This adds too much. Only the run dependencies of the build dependencies would be needed.
flavours.append('run')
self.app.debug("flavours = " + args.flavours)
log(DEBUG, "flavours = " + args.flavours)
deps = self.app.get_modules_from_project_txt(modules, ['pkg.requires.jw'], flavours,
scope = 2, add_self=True, names_only=True)
if args.skip_excluded:
@ -31,7 +32,7 @@ class CmdRequiredOsPkg(Cmd): # export
if self.app.is_excluded_from_build(d) is not None:
deps.remove(d)
subsecs = self.app.os_cascade()
self.app.debug("subsecs = ", subsecs)
log(DEBUG, "subsecs = ", subsecs)
requires = []
for s in subsecs:
for f in flavours: