Skip to content

rel_upgrade_root: Import syslog - #1099

Open
Amadeus-22 wants to merge 1 commit into
linuxmint:masterfrom
Amadeus-22:fix-rel-upgrade-root-syslog
Open

Amadeus-22 wants to merge 1 commit into
linuxmint:masterfrom
Amadeus-22:fix-rel-upgrade-root-syslog

Conversation

@Amadeus-22

@Amadeus-22 Amadeus-22 commented Oct 3, 2026 •

Copy link
Copy Markdown

on_removals_finished (the last step of the release upgrade, which runs update-grub) logs a failure with syslog.syslog(), but rel_upgrade_root.py never imports syslog.

So if update-grub is missing or raises (subprocess.run raises FileNotFoundError when the command does not exist), the except block itself fails with NameError: name 'syslog' is not defined. The exception is raised inside the aptkit callback, so Gtk.main_quit() and sys.exit(0) are never reached and the root upgrade process stays alive in the GTK main loop.

The fix is the missing import. No other module in the repository imports syslog either, and this is the only use.

To check it without running a real release upgrade, I executed the real Upgrader.on_removals_finished in a harness that stubs GTK and makes subprocess.run raise FileNotFoundError:

  • without the import: the handler raises NameError: name 'syslog' is not defined, and Gtk.main_quit() is never called
  • with the import: Gtk.main_quit() is called and the process exits with code 0

I did not run a real release upgrade.

🤖 Generated with Claude Code

on_removals_finished logs with syslog.syslog() when update-grub fails,
but the module never imports syslog. If update-grub is missing or
raises, the handler itself fails with NameError, so Gtk.main_quit() and
sys.exit(0) are not reached and the upgrade process never exits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant