Skip to content

Let PackageKit trigger check_for_updates#234

Open
carniz wants to merge 2 commits into
elementary:mainfrom
carniz:main
Open

Let PackageKit trigger check_for_updates#234
carniz wants to merge 2 commits into
elementary:mainfrom
carniz:main

Conversation

@carniz
Copy link
Copy Markdown

@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
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
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.

2 participants