Skip to content

Let PackageKit trigger check_for_updates#234

Merged
leolost2605 merged 3 commits into
elementary:mainfrom
carniz:main
Jun 1, 2026
Merged

Let PackageKit trigger check_for_updates#234
leolost2605 merged 3 commits into
elementary:mainfrom
carniz:main

Conversation

@carniz
Copy link
Copy Markdown
Contributor

@carniz carniz commented May 30, 2026

An attempt at fixing #233

@leolost2605
Copy link
Copy Markdown
Member

Hi @carniz, thanks for the PR!

A few notes:

  • I think you can use Pk.offline_get_prepared_monitor instead of defining the file path to get the file monitor
  • Instead of introducing revalidate_restart_required wouldn't it be enough to just force an update check? I.e. check_for_updates (true, true)
  • get_current_state is called repeatedly when an operation is ongoing while the settings page is open so I wouldn't do something expensive there. Is that required? Shouldn't the file monitor be enough?

@carniz
Copy link
Copy Markdown
Contributor Author

carniz commented May 30, 2026

D'oh, that reduces the complexity. Good catch!

  • Instead of introducing revalidate_restart_required wouldn't it be enough to just force an update check? I.e. check_for_updates (true, true)

Indeed, that's easier/simpler. I'll just let the monitor fire the update-check method.

  • get_current_state is called repeatedly when an operation is ongoing while the settings page is open so I wouldn't do something expensive there. Is that required? Shouldn't the file monitor be enough?

Yeah, it's probably enough. The important thing is that PackageKit gets to be in charge, since failing to do so previously was what allowed for the inconsistent state.

@carniz carniz changed the title Check with PackageKit before reporting RESTART_REQUIRED Let PackageKit trigger check_for_updates May 30, 2026
Copy link
Copy Markdown
Member

@leolost2605 leolost2605 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM and I can confirm it works!

Only one little nit :)

Comment thread src/Backends/SystemUpdate.vala
Co-authored-by: Leonhard <leo.kargl@proton.me>
@leolost2605 leolost2605 merged commit 817dbc8 into elementary:main Jun 1, 2026
4 checks passed
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.

Panel stuck on "Restart to install pending updates" when no offline update is available

2 participants