Build and packaging library
  • Python 43.9%
  • Makefile 40.9%
  • Shell 15.2%
Find a file
Jan Lindemann 02697af568 lib.ExecContext: Align .sudo() prototype to .run()
ExecContext's .sudo() omits many of run()'s parameters, and this
commit adds them. To avoid redundancy around repeating and massaging
the long parameter list of both functions and their return values, it
also adds some deeper changes:

  - Make run(), _run(), sudo() and _sudo() always return instances of
    Result. Before it was allowed to return a triplet of stdout,
    stderr, and exit status.

  - Have ExecContext stay out of the business of decoding the result
    entirely. Result provides a convenience method .decode()
    operating on stdout and stderr and leaves the decision to the
    caller.

    This entails miniscule adaptations in calling code, namely in
    App.os_release, util.get_profile_env() and CmdListRepos._run().

  - Wrap the _run() and _sudo() callbacks in a context manager object
    of type CallContext to avoid code duplication.

  - Consistently name the first argument to run(), _run(), sudo() and
    _sudo() "cmd", not "args". The latter suggests that the caller is
    omitting the executable, which is not the case.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-03-20 10:30:25 +01:00
bin bin, make, scripts: Re-add files necessary for packaging jw-build 2025-11-14 11:22:50 +01:00
conf jw-pkg.py: Enable argcomplete 2026-03-06 12:06:28 +01:00
make py-defs.mk: Move boolean vars to top 2026-03-17 16:22:17 +01:00
scripts mkspec-wrapper.sh: Add OS id to $INSTALL_LOG 2026-03-20 10:30:25 +01:00
src lib.ExecContext: Align .sudo() prototype to .run() 2026-03-20 10:30:25 +01:00
.gitignore Everywhere: Rename package "jw-build" to "jw-pkg" 2025-11-28 13:35:56 +01:00
HASH Release 1.0.0-189@suse-tumbleweed/x86_64 2026-03-17 16:02:34 +00:00
Makefile make: Replace RPM -> PKG 2026-03-16 14:57:50 +01:00
RELEASES Release 1.0.0-189@suse-tumbleweed/x86_64 2026-03-17 16:02:34 +00:00
VERSION Start version: 1.0.0-189 2026-03-17 15:45:00 +00:00