1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/test
Valentin Krasontovitsch cfff72e9db Use apt-get as fallback for apt upgrade
In answer to #2540, `aptitude` was introduced as tool of choice for running
upgrades in the apt module and installing new packages that arise as
dependencies during upgrades.

This recently lead to problems, as for example Ubuntu Xenial (16.04) ships
without aptitude (installed).

Studying the man pages of both apt-get and aptitude, it appears that we can
achieve the effects of `aptitude safe-upgrade` using

```
apt-get upgrade --with-new-pkgs --autoremove
```

while `aptitude full-upgrade` seems to be identical to `apt-get dist-upgrade`.

We use `apt-get` as described above as a fall-back in case that `aptitude`
cannot be found, issuing a warning when it does so.

Furthermore it introduces a flag `force_apt_get` which may be used to enforce
usage of apt-get (which does not issue a warning).

The integration tests are updated accordingly.

Cf. also the discussion in #27370.

Fixes #18987
2017-08-10 09:25:56 -04:00
..
compile Docs how to test (2nd) (#24094) 2017-04-28 09:08:26 +01:00
integration Use apt-get as fallback for apt upgrade 2017-08-10 09:25:56 -04:00
results Create bot friendly sanity output. (#22381) 2017-03-07 14:59:50 -08:00
runner Restore f5 unit test requirements. (#27992) 2017-08-09 23:47:25 -07:00
sanity Pep8 fixes for rabbitmq modules (#24590) 2017-08-10 11:57:11 +02:00
units template: fix KeyError: 'undefined variable: 0 (#27972) 2017-08-09 18:50:53 -04:00
utils Add opensuse42.3 docker image. 2017-08-05 00:03:11 -07:00