initial commit

Signed-off-by: sisungo <[email protected]>
This commit is contained in:
2026-08-22 11:41:05 +00:00
commit 5c89842dc0
130 changed files with 16319 additions and 0 deletions
+46
View File
@@ -0,0 +1,46 @@
import os
import subprocess
PACKIE_EXEC = os.getenv("PACKIE", "packie")
def host_arch() -> str:
result = subprocess.run(
[PACKIE_EXEC, "print", "profile.host_arch"],
check=True,
capture_output=True,
)
return result.stdout.decode().strip()
def chroot_update(root: str):
subprocess.run([PACKIE_EXEC, "--chroot", root, "update"], check=True)
def chroot_install(root: str, requirements: list[str]):
subprocess.run(
[PACKIE_EXEC, "--chroot", root, "install", "--yes"] + requirements, check=True
)
def update():
subprocess.run([PACKIE_EXEC, "update"], check=True)
def install(requirements: list[str]):
subprocess.run([PACKIE_EXEC, "install", "--yes"] + requirements, check=True)
def repo_add(repo: str, pkgfile: str):
subprocess.run(
[PACKIE_EXEC, "repo-admin", repo, "--add-package", pkgfile], check=True
)
def prefix_of(pkgident: str):
result = subprocess.run(
[PACKIE_EXEC, "print", f"package.prefix.{pkgident}"],
check=True,
capture_output=True,
)
return result.stdout.decode().strip()