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

@ -34,14 +34,14 @@ fatal()
quit 1
}
distro_info()
platform_info()
{
/usr/bin/python3 $JWB_SCRIPT_DIR/jw-pkg.py distro info --format "$1"
/usr/bin/python3 $JWB_SCRIPT_DIR/jw-pkg.py platform info --format "$1"
}
get_os()
{
[ "$__get_os" ] || __get_os=`distro_info '%{id}-%{codename}'`
[ "$__get_os" ] || __get_os=`platform_info '%{id}-%{codename}'`
echo $__get_os
}
@ -616,7 +616,7 @@ upload_pkg()
;;
debian|deb)
local -r server=apt.janware.com
local -r distro_subdir=$(distro_info '%{id}/%{codename}')
local -r distro_subdir=$(platform_info '%{id}/%{codename}')
local conf=`mktemp "/tmp/$myname"_XXXXXX`
cat <<-EOT > $conf
[DEFAULT]
@ -1096,7 +1096,7 @@ cmd_milk_install_log()
echo "== processing stage $stage: cfg_section pkg.$p.$stage" >&2
local os content=""
for os in '' `distro_info '%{cascade}'`; do
for os in '' `platform_info '%{cascade}'`; do
local sec=pkg.$p.$stage head=""
if [ "$os" ]; then
sec="$sec.$os"