ansible/packaging
Dustin C. Hatch 1b0676b559 packaging/os/portage: Improve check mode handling
When running in check mode, the *portage* module always reports that no
changes were made, even if the requested packages do not exist on the
system. This is because it was erroneously expecting `emerge --pretend`
to produce the same output as `emerge` by itself would, and attempts to
parse it. This is not correct, for several reasons. Most specifically,
the string for which it is searching does not exist in the pretend
output. Additionally, `emerge --pretend` always prints the requested
packages, whether they are already installed or not; in the former case,
it shows them as reinstalls.

This commit adjusts the behavior to rely on `equery` alone when running
in check mode. If `equery` reports at least one package is not
installed, then nothing else is done: the system will definitely be
changed.

Signed-off-by: Dustin C. Hatch <dustin@hatch.name>
2015-06-18 13:50:43 -05:00
..
language Changes to author formatting, remove emails 2015-06-16 14:32:39 -04:00
os packaging/os/portage: Improve check mode handling 2015-06-18 13:50:43 -05:00
__init__.py Add missing __init__.py files for find_package() to work 2014-10-03 16:34:28 -07:00
dpkg_selections Add dpkg_selections module, that works with dpkg --get-selections and --set-selections. 2015-06-17 11:07:09 +01:00