aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKunoiSayami <[email protected]>2022-10-26 02:15:04 +0800
committerKunoiSayami <[email protected]>2022-10-26 02:15:04 +0800
commit4876074e06a2d51da2ae6606bcb0d890fce37ee2 (patch)
tree308e2adfd1346035e255b1396d7447756dd296c1
parent19520d7b1642cb47a01e906f03801c1ce0774ab9 (diff)
fix(script): Fix update-db.py
Signed-off-by: KunoiSayami <[email protected]>
-rwxr-xr-xutils/update-db.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/utils/update-db.py b/utils/update-db.py
index 394a9ad..b3c3113 100755
--- a/utils/update-db.py
+++ b/utils/update-db.py
@@ -13,9 +13,10 @@ logger.setLevel(logging.DEBUG)
async def add_package(dest: pathlib.Path, pkg_name: str, key: str) -> None:
+ # logger.debug("%s %s %s", dest, pkg_name, key)
await (
await asyncio.create_subprocess_exec(
- "repo-add",
+ "/usr/bin/repo-add",
str(dest),
pkg_name,
"-s",
@@ -23,7 +24,7 @@ async def add_package(dest: pathlib.Path, pkg_name: str, key: str) -> None:
"-R",
"-k",
key,
- stdout=subprocess.STDOUT,
+ stdout=None,
)
).wait()
@@ -38,8 +39,8 @@ async def main(remote_dest: str, repo_base_name: str, sign_key: str) -> None:
shutil.copy(str(remote_dest.joinpath(file).joinpath()), str(cwd))
for file in os.listdir(str(remote_dest)):
- if ".pkg.tar.zst" in file:
- await add_package(database_dest, file.split(".pkg.tar.zst")[0], sign_key)
+ if ".pkg.tar.zst" in file and not file.endswith('.sig'):
+ await add_package(database_dest, file, sign_key)
if __name__ == "__main__":