| Message ID | 20260105224745.581549-4-t.f.g.geelen@gmail.com |
|---|---|
| State | New |
| Headers | show |
| Series | [auh,1/2] Handle 'nothing to commit' gracefully | expand |
diff --git a/upgrade-helper.py b/upgrade-helper.py index 002c3dc..c1c26c0 100755 --- a/upgrade-helper.py +++ b/upgrade-helper.py @@ -526,6 +526,8 @@ class Updater(object): except Exception as e: import traceback E(" Couldn't commit changes to %s:\n%s" % (pkggroup_name, traceback.format_exc())) + # Ensure commit failures are recorded as group errors + g['error'] = e if g in succeeded_pkggroups_ctx: succeeded_pkggroups_ctx.remove(g) failed_pkggroups_ctx.append(g)
What is happening before: commit_changes() throws, run() catches it and removes the group from succeeded_pkggroups_ctx, but it never sets g['error']. The Statistics.update() logic classifies groups purely by g['error'] is None → “Succeeded”. So you end up with “Succeeded: 1” even though commit failed. Signed-off-by: Tom Geelen <t.f.g.geelen@gmail.com> --- upgrade-helper.py | 2 ++ 1 file changed, 2 insertions(+)