Skip to content

Conversation

@auouymous
Copy link
Member

Package managers can install /usr/share/gpodder/no-update-check to disable the automatic check at startup, and the Software update menu item.

Fixes #1103.

if diff > (60 * 60 * 24) * self.config.software_update.interval:
self.config.software_update.last_check = int(time.time())
self.check_for_updates(silent=True)
if not os.path.exists(gpodder.no_update_check_file):
Copy link

Choose a reason for hiding this comment

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

Would it be cleaner if this check was made earlier?
The results of time diff calculation does not affect this check
so it would be possible to short circuit earlier.

Of course this is a matter of style,
and gpodder is not my project in any way,
so it may be that I am just used to different conventions.

Copy link
Member Author

Choose a reason for hiding this comment

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

The time check is a fast calculation that only succeeds once every 5 days, unless the user changes it. Where as the file check must access a potentially slow storage device, and increase startup time.

Copy link

Choose a reason for hiding this comment

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

Makes sense, being fast at runtime is more important than tiny readability gains.

@elelay elelay merged commit 82fc94f into gpodder:master Aug 18, 2021
@elelay
Copy link
Member

elelay commented Aug 18, 2021

Merged, thanks!

@auouymous auouymous deleted the disable-distro-updates branch August 22, 2021 07:10
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.

Include a method for packagers to disable update check

3 participants