From ab0aa7f956c0a76f455ac3d4ca055b9b360ebdc0 Mon Sep 17 00:00:00 2001 From: Caleb Connolly Date: Fri, 11 Nov 2022 21:22:51 +0000 Subject: [PATCH] pmb: sideload: wait for apk database lock When installing the APK wait for a while for the APK database lock, services like apk-polkit-server sometimes hog it for a while but there's no point bailing out immediately. Reviewed-by: Oliver Smith Link: https://lists.sr.ht/~postmarketos/pmbootstrap-devel/%3C20221111212251.1360612-1-kc@postmarketos.org%3E --- pmb/sideload/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pmb/sideload/__init__.py b/pmb/sideload/__init__.py index 6eb92549..7bb8f699 100644 --- a/pmb/sideload/__init__.py +++ b/pmb/sideload/__init__.py @@ -52,7 +52,7 @@ def ssh_install_apks(args, user, host, port, paths): logging.info(f"Installing packages at {user}@{host}") add_cmd = ['sudo', '-p', pmb.config.sideload_sudo_prompt, - '-S', 'apk', 'add'] + remote_paths + '-S', 'apk', '--wait', '30', 'add'] + remote_paths add_cmd = pmb.helpers.run.flat_cmd(add_cmd) clean_cmd = pmb.helpers.run.flat_cmd(['rm'] + remote_paths) command = ['ssh', '-t', '-p', port, f'{user}@{host}',