jw.pkg.cmds.projects.CmdOsCascade: Remove

CmdOsCascade is superseeded by CmdInfo. Use the latter and retire the
former.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-03-02 09:25:32 +01:00
commit 1da00283d1
3 changed files with 6 additions and 25 deletions

View file

@ -41,7 +41,7 @@ subpackage_description()
os_cascade() os_cascade()
{ {
/usr/bin/python3 $JWB_SCRIPT_DIR/jw-pkg.py projects os-cascade /usr/bin/python3 $JWB_SCRIPT_DIR/jw-pkg.py distro info --format '%{cascade}'
} }
# -- here we go # -- here we go
@ -129,7 +129,6 @@ for p in $subpackages; do
for stage in pre preun post postun; do for stage in pre preun post postun; do
echo "== processing stage $stage: cfg_section pkg.$p.$stage" >&2 echo "== processing stage $stage: cfg_section pkg.$p.$stage" >&2
out="" out=""
#for os in '' `os_cascade | sed 's/\(^\| \)/ ./g'`; do
for os in '' `os_cascade`; do for os in '' `os_cascade`; do
sec=pkg.$p.$stage sec=pkg.$p.$stage
if [ "$os" ]; then if [ "$os" ]; then

View file

@ -34,16 +34,16 @@ fatal()
quit 1 quit 1
} }
distro_info()
{
/usr/bin/python3 $JWB_SCRIPT_DIR/jw-pkg.py distro info --format "$1"
}
os() os()
{ {
/bin/bash $JWB_SCRIPT_DIR/get-os.sh /bin/bash $JWB_SCRIPT_DIR/get-os.sh
} }
os_cascade()
{
/usr/bin/python3 $JWB_SCRIPT_DIR/jw-pkg.py projects os-cascade
}
cfg_section() cfg_section()
{ {
ini_section "$inifile" $@ ini_section "$inifile" $@
@ -1095,7 +1095,7 @@ cmd_milk_install_log()
echo "== processing stage $stage: cfg_section pkg.$p.$stage" >&2 echo "== processing stage $stage: cfg_section pkg.$p.$stage" >&2
local os content="" local os content=""
for os in '' `os_cascade`; do for os in '' `distro_info '%{cascade}'`; do
local sec=pkg.$p.$stage head="" local sec=pkg.$p.$stage head=""
if [ "$os" ]; then if [ "$os" ]; then
sec="$sec.$os" sec="$sec.$os"

View file

@ -1,18 +0,0 @@
# -*- coding: utf-8 -*-
from argparse import Namespace, ArgumentParser
from ..Cmd import Cmd
from ..CmdProjects import CmdProjects
class CmdOsCascade(Cmd): # export
def __init__(self, parent: CmdProjects) -> None:
super().__init__(parent, 'os-cascade', help='Print project.conf\'s OS configuration precedence of machine this script runs on')
def add_arguments(self, parser: ArgumentParser) -> None:
super().add_arguments(parser)
async def _run(self, args: Namespace) -> None:
print(' '.join(self.app.os_cascade()))