feat: add prefix support

Signed-off-by: sisungo <[email protected]>
This commit is contained in:
2026-07-02 22:35:03 +08:00
parent c9627305c2
commit f7ff9d9742
15 changed files with 64 additions and 14 deletions
+9
View File
@@ -72,6 +72,15 @@ def link(src: str, dst: str, default: bool = True):
]
def get_prefix(pkgname: str) -> str:
pkginfo = _pkginfo[pkgname]
if pkginfo.get(_key_arch_any):
pkgarch = "any"
else:
pkgarch = arch.get_target()
return f"/pkg/{pkgname}={pkginfo[_key_version]}@{pkgarch}"
def supported_arch(s: list[str] | typing.Callable[[str], bool]):
global _supported_arch
if isinstance(s, list):