cmds.distro.CmdInfo: Rename to cmds.platform.CmdInfo

Rename command "distro" to "pkg" together with "info", its last remaining subcommand. "distro" is often used in the sense of "Linux distribution", which would be too narrow for the targets jw-pkg could theoretically support.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-04-24 12:16:20 +02:00
commit 514d66dac1
Signed by: Jan Lindemann
GPG key ID: 3750640C9E25DD61
10 changed files with 20 additions and 20 deletions

View file

@ -71,17 +71,17 @@ endif
# -- arch, vendor, os, libc
ifeq ($(HOST_DISTRO_INFO),)
HOST_DISTRO_INFO := $(shell $(JW_PKG_PY) distro info --format '%{gnu-triplet} %{cascade}')
ifeq ($(PLATFORM_INFO),)
PLATFORM_INFO := $(shell $(JW_PKG_PY) platform info --format '%{gnu-triplet} %{cascade}')
endif
HOST_TUPLE ?= $(word 1,$(HOST_DISTRO_INFO))
HOST_TUPLE ?= $(word 1,$(PLATFORM_INFO))
HOST_TUPLE_WORDS := $(subst -, ,$(HOST_TUPLE))
HOST_ARCH := $(word 1,$(HOST_TUPLE_WORDS))
HOST_VENDOR := $(word 2,$(HOST_TUPLE_WORDS))
HOST_OS := $(word 3,$(HOST_TUPLE_WORDS))
HOST_ABI := $(word 4,$(HOST_TUPLE_WORDS))
HOST_TRIPLET := $(HOST_ARCH)-$(HOST_OS)-$(HOST_ABI)
HOST_OS_CASCADE := $(wordlist 2,$(words $(HOST_DISTRO_INFO)),$(HOST_DISTRO_INFO))
HOST_OS_CASCADE := $(wordlist 2,$(words $(PLATFORM_INFO)),$(PLATFORM_INFO))
PKG_FORMAT ?= $(patsubst pkg-%,%,$(filter pkg-%,$(HOST_OS_CASCADE)))
ifndef TARGET
@ -176,7 +176,7 @@ else
endif
ifeq ($(OS_NAME_VERSION),)
OS_NAME_VERSION := $(shell $(JW_PKG_PY) distro info --format '%{id}-%{codename}')
OS_NAME_VERSION := $(shell $(JW_PKG_PY) platform info --format '%{id}-%{codename}')
endif
ifeq ($(OS_NAME),)