Query installed packages based on package manager instead of executable
As the description mentioned
it will give wrong results if the package and executable names are different.
There is too many false-negatives for me and system-packages-ensure
always asks me for sudo password even though the packages are already
installed. Few examples of such packages:
- isync
- maildir-utils
- python3-virtualenv
- python3-language-server
This commit uses get-info
command from our package managers and
therefore query the package based on its name instead of a supposed
executable name.
Tested on Fedora with DNF, I don't know how it will work on other systems and package managers.