From 53af3399d7262c5d8d75105fa60c237a74f6800a Mon Sep 17 00:00:00 2001 From: Alexander Paetzelt Date: Thu, 18 Jun 2026 09:14:57 +0200 Subject: [PATCH 1/3] Add a more concise error message for empty update targets --- vmupdate/vmupdate.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vmupdate/vmupdate.py b/vmupdate/vmupdate.py index d9fa476..a64a712 100644 --- a/vmupdate/vmupdate.py +++ b/vmupdate/vmupdate.py @@ -55,7 +55,8 @@ def main(args=None, app=qubesadmin.Qubes()): if not targets: if not args.quiet: - print("No qube selected for update") + print("No qube eligible for update. Try --force-update to ensure ", + "all qubes are checked for new updates.") return EXIT.OK_NO_UPDATES if args.signal_no_updates else EXIT.OK admin = [target for target in targets if target.klass == "AdminVM"] From d1ce2a2ce9b5831492a09462b1f5f19d12565c79 Mon Sep 17 00:00:00 2001 From: Alexander Paetzelt Date: Thu, 18 Jun 2026 10:23:34 +0200 Subject: [PATCH 2/3] Add per vm notifications if skipped Signed-off-by: Alexander Paetzelt --- vmupdate/vmupdate.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/vmupdate/vmupdate.py b/vmupdate/vmupdate.py index a64a712..3febbb3 100644 --- a/vmupdate/vmupdate.py +++ b/vmupdate/vmupdate.py @@ -337,6 +337,9 @@ def select_targets(targets, args) -> Set[qubesadmin.vm.QubesVM]: skip_update = False if skip_update or prohibit_start: + if not args.quiet: + print("Skipped {}. Marked to skip updates or start prohibited", + vm.name) continue # there are updates available => select @@ -347,10 +350,17 @@ def select_targets(targets, args) -> Set[qubesadmin.vm.QubesVM]: # update vm only if there are updates available # and that's not true at this point => skip if args.update_if_available: + if not args.quiet: + print("Skipped {}. No updates available or not recently ", + "checked for updates.", vm.name) continue if is_stale(vm, expiration_period=args.update_if_stale): selected.add(vm) + else: + if not args.quiet: + print("Skipped {}. No updates available or last check still ", + "within stale period.", vm.name) return selected From 2d1eaf6314f1c8c903912136f0846518317f4b3e Mon Sep 17 00:00:00 2001 From: Alexander Paetzelt Date: Fri, 19 Jun 2026 17:10:29 +0200 Subject: [PATCH 3/3] Fix linting (black -l80) Signed-off-by: Alexander Paetzelt --- vmupdate/vmupdate.py | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/vmupdate/vmupdate.py b/vmupdate/vmupdate.py index 3febbb3..6132a23 100644 --- a/vmupdate/vmupdate.py +++ b/vmupdate/vmupdate.py @@ -55,8 +55,10 @@ def main(args=None, app=qubesadmin.Qubes()): if not targets: if not args.quiet: - print("No qube eligible for update. Try --force-update to ensure ", - "all qubes are checked for new updates.") + print( + "No qube eligible for update. Try --force-update to ensure ", + "all qubes are checked for new updates.", + ) return EXIT.OK_NO_UPDATES if args.signal_no_updates else EXIT.OK admin = [target for target in targets if target.klass == "AdminVM"] @@ -338,8 +340,10 @@ def select_targets(targets, args) -> Set[qubesadmin.vm.QubesVM]: if skip_update or prohibit_start: if not args.quiet: - print("Skipped {}. Marked to skip updates or start prohibited", - vm.name) + print( + "Skipped {}. Marked to skip updates or start prohibited", + vm.name, + ) continue # there are updates available => select @@ -351,16 +355,22 @@ def select_targets(targets, args) -> Set[qubesadmin.vm.QubesVM]: # and that's not true at this point => skip if args.update_if_available: if not args.quiet: - print("Skipped {}. No updates available or not recently ", - "checked for updates.", vm.name) + print( + "Skipped {}. No updates available or not recently ", + "checked for updates.", + vm.name, + ) continue if is_stale(vm, expiration_period=args.update_if_stale): selected.add(vm) else: if not args.quiet: - print("Skipped {}. No updates available or last check still ", - "within stale period.", vm.name) + print( + "Skipped {}. No updates available or last check still ", + "within stale period.", + vm.name, + ) return selected