pkg-manager.sh: Replace by jw-pkg.py distro

Retire pkg-manager.sh and replace it by the cleaner "jw-pkg.sh
distro" command, essentially providing the same functionality and
nearly the same command-line interface.

Not-so-fun-fact:

  jw-pkg > git diff --stat jw-devops/master
  ...
  71 files changed, 732 insertions(+), 340 deletions(-)

400 LOC more. That's what the move from a shell script to the more
maintainable Python versions costs. Still a good idea, and the
enhanced extensibility might pay off in terms of LOC with other shell
scripts in the future.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-01-28 08:10:09 +01:00
commit b8e8ecf2f1
3 changed files with 11 additions and 181 deletions

View file

@ -21,7 +21,8 @@ GIT_DESCR = $(TOPDIR)/.git/description
GIT_MAIN_BRANCH ?= master
OPT_JANWARE_PROJECT ?= -j
PKG_MANAGER_SH ?= /bin/bash $(firstword $(wildcard $(JWB_SCRIPT_DIR)/pkg-manager.sh /opt/jw-pkg/bin/pkg-manager.sh) pkg-manager-not-found)
INTERACTIVE ?= auto
PKG_MANAGER ?= $(JW_PKG_PY) distro --interactive=$(INTERACTIVE)
ifeq ($(OPT_JANWARE_PROJECT),-j)
REMOTE_GIT_FLAVOUR ?= proj
@ -209,16 +210,16 @@ git-pull-%:
fi
pkg-manager-refresh:
$(PKG_MANAGER_SH) refresh $(DASH_Y)
$(PKG_MANAGER) refresh
pkg-install-build-deps:
$(PKG_MANAGER_SH) install $(DASH_Y) $(BASE_PKGS) $(shell $(proj_query_cmd) required-os-pkg --skip-excluded --flavours "build" $(PROJECT))
$(PKG_MANAGER) install $(BASE_PKGS) $(shell $(proj_query_cmd) required-os-pkg --skip-excluded --flavours "build" $(PROJECT))
pkg-install-release-deps:
$(PKG_MANAGER_SH) install $(DASH_Y) $(BASE_PKGS) $(shell $(proj_query_cmd) required-os-pkg --skip-excluded --flavours "build run release" $(PROJECT))
$(PKG_MANAGER) install $(BASE_PKGS) $(shell $(proj_query_cmd) required-os-pkg --skip-excluded --flavours "build run release" $(PROJECT))
pkg-install-testbuild-deps:
$(PKG_MANAGER_SH) install $(DASH_Y) $(BASE_PKGS) $(shell $(proj_query_cmd) pkg-requires --delimiter=' ' --no-version build,run,release $(PROJECT))
$(PKG_MANAGER) install $(BASE_PKGS) $(shell $(proj_query_cmd) pkg-requires --delimiter=' ' --no-version build,run,release $(PROJECT))
echo-hash:
$(Q)/bin/bash $(PKG_SH_EXE) hash