Changes to updates check #164
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Modified update check to use getLastInstallDate and modfied getLastUpdateDate to detect changes.
If a change is detected then the getNumberOfAvailableUpdates is called to get the number of updates. Moved this into the 5 min cycle but left the existing 4 hour check in place just in case
For the above to work reliably we need to trigger apt update regularly so either via crontab or adding the following to /etc/apt/apt.conf.d/10periodic
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Download-Upgradeable-Packages "1";
I left the original 4 hour check in place for if this is not done as we may need it then even if it is less accurate.
These changes mean upd on the card is now reflecting the last date an update was applied and the number of updates is updated quicker and more acciurately