Build and packaging library
  • Python 49.4%
  • Makefile 37%
  • Shell 13.6%
Find a file
Jan Lindemann a739eb0763
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 3m9s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 3m4s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 3m3s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 3m10s
CI / Packaging test (push) Successful in 0s
lib.Result: Initialize with status = None

Define default parameter values for Result's constructor, namely None for exit status, stdout and stderr.

Instantiating a Result object without parameters signifies "this object doesn't contain data from a real process's exit event". Up to now, similar meaning has been hand-crafted by ExecContext's run() and friends by using an error exit status (1) to make sure it wasn't mistaken for success. This commit formalizes that into the Result structure itself, but uses None instead for the exit status.

Controlling default values in Result itself also means that the Result class gets better awareness of what it contains, and its log messages and stdin / stdout can be more fitting:

- If a real process failed, make stdout return at least b'' - If a real process succeeded, make stdout return at least b''

Returning something from .stdout on success fixes a real bug: An attempt to access what "rpm -U somepackage.rpm" returns, namely nothing, raises a bogus exception, because stdout is None.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-06-15 07:56:51 +02:00
.github/workflows ci.yaml: test-packaging.yaml@{master-test -> master} 2026-06-08 19:43:15 +02:00
bin bin, make, scripts: Re-add files necessary for packaging jw-build 2025-11-14 11:22:50 +01:00
conf conf/templates: Fix installation 2026-06-11 13:30:43 +02:00
make python-tools.sh, py-mod.mk: Use --symbol-filter 2026-06-12 07:33:07 +02:00
scripts python-tools.sh create-init: Code beautification 2026-06-12 09:58:56 +02:00
src lib.Result: Initialize with status = None 2026-06-15 07:56:51 +02:00
.gitignore Everywhere: Rename package "jw-build" to "jw-pkg" 2025-11-28 13:35:56 +01:00
HASH Release 1.0.0-240@suse-tumbleweed/x86_64 2026-06-12 23:23:45 +00:00
Makefile $(TOPDIR)/Makefile: include py-topdir.mk 2026-05-31 18:20:35 +02:00
RELEASES Release 1.0.0-240@suse-tumbleweed/x86_64 2026-06-12 23:23:45 +00:00
VERSION Start version: 1.0.0-240 2026-06-12 23:08:15 +00:00