Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing 'always' value support to periodic parameters (every n-days) #206

Merged
merged 3 commits into from
Dec 3, 2021

Conversation

Hufschmidt
Copy link
Contributor

@Hufschmidt Hufschmidt commented Dec 1, 2021

Pull Request (PR) description

This does not seem to be documented in the /etc/apt.conf.d/10periodic config comments,
but according to the implementation of /usr/lib/apt/apt.systemd.daily (which is called by apt-daily.service and apt-daily-upgrade.service) some values also support 'always' in addition to positive integer value.
(This affects settings that check an operation is only executed 'every n-days'.)

This Pull Request (PR) fixes the following issues

This change allows 'always' to be used for the following settings that support it and are managed by this module

  • APT::Periodic::Update-Package-Lists
  • APT::Periodic::Download-Upgradeable-Packages
  • APT::Periodic::Unattended-Upgrade
  • APT::Periodic::AutocleanInterval

Without this it is not possible to let the apt-daily.timer and apt-daily-upgrade.timer trigger multiple times a day
since /usr/lib/apt/apt.systemd.daily will check its last run timestamp against the value of the above settings
and abort.


Sidenote: The following settings also support 'always' but are not managed by this module:

  • APT::Periodic::CleanInterval
  • APT::Periodic::BackupArchiveInterval

@Hufschmidt Hufschmidt changed the title Add missing 'always' value support to periodic every n-days parameters Add missing 'always' value support to periodic parameters (every n-days) Dec 1, 2021
Copy link
Member

@kenyon kenyon left a comment

Choose a reason for hiding this comment

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

Thanks for the pull request. Would be great if we could also have tests for these new values.

@bastelfreak bastelfreak added the bug Something isn't working label Dec 2, 2021
Copy link
Member

@kenyon kenyon left a comment

Choose a reason for hiding this comment

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

Thanks for the tests! I should have noticed this before, but we should probably update the README to mention that always is an option for the update and upgrade parameters.

@Hufschmidt
Copy link
Contributor Author

Good idea, added information to README.md.

@kenyon kenyon merged commit f0ed41b into voxpupuli:master Dec 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants