node-exporter-textfile-collector-scripts icon indicating copy to clipboard operation
node-exporter-textfile-collector-scripts copied to clipboard

apt_info.py: fix apt_upgrades_pending and apt_upgrades_held

Open kennethso168 opened this issue 1 year ago • 1 comments

Fixes #193

Fixed apt_upgrades_pending always empty, as after #181, cache.upgrade(True) is no longer called in script. This call marks the packages that could be upgraded, and without it, no package has the marked_upgrade boolean set to true. Changed to filter all packages that are installed and upgradable. This should match the output of apt list --upgradable

Also fixed apt_upgrades_held including all upgradable packages including packages that are not actually held. Package can be detected to be held according to https://askubuntu.com/a/965543.

kennethso168 avatar Mar 10 '24 03:03 kennethso168