Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
api: correct bug with
package_latest_version
If a user has a residual config of a package that is no longer available (like with a manually installed package that has been removed and not purged), the resulting package_latest_version could be incorrect. eg (a newer firejail was downloaded and manually installed and then removed, it still has a residual-config but can not be installed since it is not in the repos): ``` apt list -a firejail Listing... Done firejail/now 0.9.62-3ubuntu0.1 arm64 [residual-config] firejail/bionic 0.9.52-2 arm64 [residual-config] ``` vs ``` apt-cache policy firejail firejail: Installed: (none) Candidate: 0.9.52-2 Version table: 0.9.62-3ubuntu0.1 -1 100 /var/lib/dpkg/status 0.9.52-2 500 500 http://ports.ubuntu.com bionic/universe arm64 Packages ``` this new change also takes 1/3 the time to execute as the other method as well this caused `package_is_new_enough` to return incorrect output
- Loading branch information