The manual check to see if get_bin_path() returned anything is
redundant, because we pass True to the required parameter of
get_bin_path(). This automatically causes the task to fail if the pacman
binary isn't available. Therefore, the code within the if statement
being removed is never called.
Some do not use the json module directly so don't need import json.
Some needed to fallback to simplejson with no traceback if neither was installed
Fixes#1298
Update: query_package documentation
Fix: Number of Packages to Updated was one to high,
'cause of counting the '\n'
Fix: Pacman was reinstalling state=latest packages,
even when it was unable to load the remote version
- ensure upgrade option honors and actually supports `check_mode`
- enabling just `upgrade` and `update_cache` should perform upgrade
- example added for the equivalent for `pacman -Syu`