From 4876074e06a2d51da2ae6606bcb0d890fce37ee2 Mon Sep 17 00:00:00 2001 From: KunoiSayami Date: Wed, 26 Oct 2022 02:15:04 +0800 Subject: fix(script): Fix update-db.py Signed-off-by: KunoiSayami --- utils/update-db.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'utils/update-db.py') 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__": -- cgit v1.3.1