MCPcopy Create free account
hub / github.com/dedsec1121fk/DedSec / install_program

Function install_program

Scripts/Developer Base/Mobile Desktop.py:1249–1262  ·  view source on GitHub ↗
(cfg: Dict, distro: str, pid: str)

Source from the content-addressed store, hash-verified

1247
1248
1249def install_program(cfg: Dict, distro: str, pid: str) -> None:
1250 p = get_program_by_id(pid)
1251 if not p:
1252 return
1253 family = detect_family(distro)
1254 cmd = get_program_command(p, family, "install")
1255 if not cmd:
1256 print(tr(cfg, "programs_not_supported"))
1257 return
1258 print(f"{tr(cfg,'programs_installing')} {prog_name(cfg,p)}")
1259 print(tr(cfg, "warn_large"))
1260 run(proot_login_cmd(distro, cmd), check=False)
1261 mark_program_installed(cfg, distro, pid, True)
1262 print(tr(cfg, "programs_done"))
1263
1264def remove_program(cfg: Dict, distro: str, pid: str) -> None:
1265 # custom tracked packages: pid like 'pkg:<name>'

Callers 1

action_programs_installFunction · 0.70

Calls 9

printFunction · 0.85
get_program_by_idFunction · 0.70
detect_familyFunction · 0.70
get_program_commandFunction · 0.70
trFunction · 0.70
prog_nameFunction · 0.70
runFunction · 0.70
proot_login_cmdFunction · 0.70
mark_program_installedFunction · 0.70

Tested by

no test coverage detected