pmbootstrap: pmb.helpers.run: fix sudo timer v1 APPLIED

Luca Weiss: 1
 pmb.helpers.run: fix sudo timer

 1 files changed, 2 insertions(+), 2 deletions(-)
#1001694 .build.yml failed
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~postmarketos/pmbootstrap-devel/patches/41655/mbox | git am -3
Learn more about email & git

[PATCH pmbootstrap] pmb.helpers.run: fix sudo timer Export this patch

The recent changes to the sudo code forgot this usage here which broke
with the sudo timer config option enabled.
Fixes: d31313f7 ("Don't use 'sudo' when running as root")
 pmb/helpers/run_core.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pmb/helpers/run_core.py b/pmb/helpers/run_core.py
index 5bf5327b..3cd5a5a2 100644
--- a/pmb/helpers/run_core.py
+++ b/pmb/helpers/run_core.py
@@ -227,10 +227,10 @@ def sudo_timer_iterate():
    Run sudo -v and schedule a new timer to repeat the same.

    if pmb.config.sudo == "sudo":
    if pmb.config.which_sudo() == "sudo":
        subprocess.Popen(["sudo", "-v"]).wait()
        subprocess.Popen([pmb.config.sudo, "true"]).wait()

    timer = threading.Timer(interval=60, function=sudo_timer_iterate)
    timer.daemon = True

pmbootstrap/patches/.build.yml: FAILED in 8m15s

[pmb.helpers.run: fix sudo timer][0] from [Luca Weiss][1]

[0]: https://lists.sr.ht/~postmarketos/pmbootstrap-devel/patches/41655
[1]: mailto:luca@z3ntu.xyz

✗ #1001694 FAILED pmbootstrap/patches/.build.yml https://builds.sr.ht/~postmarketos/job/1001694