test + python-tools.sh: Fix toplevel "make all" fallout
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 4m14s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 4m20s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 3m45s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 3m52s
CI / Packaging test (push) Successful in 0s

After a pipeline change, CI now runs "make all" in a repo's root, which uncovers two problems:

1. The help integration test only succeeded as long CI didn't run "make all" before "make test". That way, the checked out repository lacked the generated __init__.py files needed for some modular subcommands to be fully loaded, and hence, the test should have failed. The entire machinery only worked because the subcommands in question are not not essential to building jw-pkg itself: "secrets" and "posix". So, this commit adapts the help integration test to the new reality.

2. Regarding python-tools.sh: Commit 55060486 satisfies yapf in some places of the source code, but in others not anylonger. So patch python-tools.sh's newline handling again.

While not thematically similar, both fixes get baked into one commit to satisfy the requirement that every single commit needs to pass "make clean all check test" individually.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-06-25 18:09:56 +02:00
commit 45f8e8cc89
Signed by: Jan Lindemann
GPG key ID: 3750640C9E25DD61
2 changed files with 130 additions and 3 deletions

View file

@ -81,12 +81,12 @@ cmd_create_init()
echo "import `module_path $f` as $f"
__add_seen $f
done
echo
fi
if [ ${#seen[@]} -eq 0 ]; then
echo "__all__ = []"
else
echo
echo "__all__ = ["
for dst_type in ${!seen[@]}; do
echo " \"$dst_type\","

View file

@ -163,12 +163,55 @@ options:
%{codename}, %{gnu-triplet}, %{os-cascade}, %{os-release},
%{pkg-ext} (default: %{cascade})
============= Running: jw-pkg.py --log-level info posix --help
usage: jw-pkg.py posix [-h]
usage: jw-pkg.py posix [-h] ...
Perform various operations on a distro through its POSIX utility interface
options:
-h, --help show this help message and exit
Available subcommands of posix:
copy Copy files
tar Handle tar archives
============= Running: jw-pkg.py --log-level info posix copy --help
usage: jw-pkg.py posix copy [-h] [-o OWNER] [-g GROUP] [-m MODE] [-F] src dst
Copy files
positional arguments:
src Source file URI
dst Destination file URI
options:
-h, --help show this help message and exit
-o, --owner OWNER Destination file owner (default: None)
-g, --group GROUP Destination file group (default: None)
-m, --mode MODE Destination file mode (default: None)
-F, --fixed-strings Don't expand macros in <src> and <dst> (default: False)
============= Running: jw-pkg.py --log-level info posix tar --help
usage: jw-pkg.py posix tar [-h] ...
Handle tar archives
options:
-h, --help show this help message and exit
Available subcommands of tar:
x Extract a tar archive
============= Running: jw-pkg.py --log-level info posix tar x --help
usage: jw-pkg.py posix tar x [-h] -f ARCHIVE_PATH dst
Extract a tar archive
positional arguments:
dst Destination root URI
options:
-h, --help show this help message and exit
-f, --archive-path ARCHIVE_PATH
Archive path
============= Running: jw-pkg.py --log-level info projects --help
usage: jw-pkg.py projects [-h] ...
@ -689,9 +732,93 @@ positional arguments:
options:
-h, --help show this help message and exit
============= Running: jw-pkg.py --log-level info secrets --help
usage: jw-pkg.py secrets [-h]
usage: jw-pkg.py secrets [-h] ...
Manage package secrets
options:
-h, --help show this help message and exit
Available subcommands of secrets:
compile-templates Compile package template files
install Install secrets from various sources as static secrets
onto the target
list-compilation-output
List package compilation output files
list-secrets List package secret files
list-templates List package template files
rm-compilation-output
Remove package compilation output files
============= Running: jw-pkg.py --log-level info secrets compile-templates --help
usage: jw-pkg.py secrets compile-templates [-h] [--owner OWNER]
[--group GROUP] [--mode MODE]
[packages ...]
Compile package template files
positional arguments:
packages Package names (default: None)
options:
-h, --help show this help message and exit
--owner, -o OWNER Default output file owner (default: None)
--group, -g GROUP Default output file group (default: None)
--mode, -m MODE Default output file mode (default: None)
============= Running: jw-pkg.py --log-level info secrets install --help
usage: jw-pkg.py secrets install [-h] [--only-missing] src [packages ...]
Install secrets from various sources as static secrets onto the target
positional arguments:
src URI of secret source
packages Package names (default: None)
options:
-h, --help show this help message and exit
--only-missing Install only secrets not already on the target (default:
False)
============= Running: jw-pkg.py --log-level info secrets list-compilation-output --help
usage: jw-pkg.py secrets list-compilation-output [-h] [--all] [packages ...]
List package compilation output files
positional arguments:
packages Package names (default: None)
options:
-h, --help show this help message and exit
--all Show all output targets, including non-existent files (default:
False)
============= Running: jw-pkg.py --log-level info secrets list-secrets --help
usage: jw-pkg.py secrets list-secrets [-h] [--all] [packages ...]
List package secret files
positional arguments:
packages Package names (default: None)
options:
-h, --help show this help message and exit
--all Show all secret paths, including non-existent files (default:
False)
============= Running: jw-pkg.py --log-level info secrets list-templates --help
usage: jw-pkg.py secrets list-templates [-h] [packages ...]
List package template files
positional arguments:
packages Package names (default: None)
options:
-h, --help show this help message and exit
============= Running: jw-pkg.py --log-level info secrets rm-compilation-output --help
usage: jw-pkg.py secrets rm-compilation-output [-h] [packages ...]
Remove package compilation output files
positional arguments:
packages Package names (default: None)
options:
-h, --help show this help message and exit