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

Function remove_program

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

Source from the content-addressed store, hash-verified

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>'
1266 if pid.startswith("pkg:"):
1267 pkg = pid.split(":", 1)[1]
1268 remove_custom_package(cfg, distro, pkg)
1269 mark_program_installed(cfg, distro, pid, False)
1270 return
1271
1272 p = get_program_by_id(pid)
1273 if not p:
1274 return
1275 family = detect_family(distro)
1276 cmd = get_program_command(p, family, "remove")
1277 if not cmd:
1278 print(tr(cfg, "programs_not_supported"))
1279 return
1280 print(f"{tr(cfg,'programs_removing')} {prog_name(cfg,p)}")
1281 run(proot_login_cmd(distro, cmd), check=False)
1282 mark_program_installed(cfg, distro, pid, False)
1283 print(tr(cfg, "programs_done"))
1284
1285def update_distro_and_programs(cfg: Dict, distro: str) -> None:
1286 family = detect_family(distro)

Callers 1

action_programs_removeFunction · 0.70

Calls 10

printFunction · 0.85
remove_custom_packageFunction · 0.70
mark_program_installedFunction · 0.70
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

Tested by

no test coverage detected