You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If no odb package is installed, installed?("odb") will return false, as expacted. However, the updated?("odb", deb_version) will return true. Is it not confusing?
As suggestion: it would be great to use updated? on its own. At the moment, it is not possible, since updated? does not parse dpkg status file, how it was done in installed?.
The text was updated successfully, but these errors were encountered:
annaborn
changed the title
AptDpkgManager update return true, even if package is not installed
AptDpkgManager updated? return true, even if package is not installed
May 14, 2020
annaborn
changed the title
AptDpkgManager updated? return true, even if package is not installed
AptDpkgManager updated? returns true, even if package is not installed
May 14, 2020
Although these APIs are considered private (we assume one won't check whether an uninstalled is updated) I agree it is confusing.
At the moment, it is not possible, since updated? does not parse dpkg status file
That's because the greatest available version AFAIK, can't be parsed from the status file. We use apt-cache for that and since that's a costly operation we don't do that in the updated? method.
That said, I think this class could use a great deal of refactoring and both issues could probably be addressed.
Hello!
I used AptDpkgManager to check the installed version of deb package.
If no
odb
package is installed,installed?("odb")
will returnfalse
, as expacted. However, theupdated?("odb", deb_version)
will returntrue
. Is it not confusing?As suggestion: it would be great to use
updated?
on its own. At the moment, it is not possible, sinceupdated?
does not parse dpkg status file, how it was done ininstalled?
.The text was updated successfully, but these errors were encountered: