You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/test/integration/targets/apt/tasks
Ian Wienand e4c0bbf885
apt: fix virtual package install version detection (#76781)
* apt: fix virtual package install version detection

Change 4a62c4e3e4 introduced version
matching in installation.

The problem stems from

 if version_installable or version:
     pkg_list.append("'%s=%s'" % (name, version_installable or version))

When the package is a virtual-package, package_status() is returning
the "version_installable" of the package *satisfying* the
virtual-package; but then this is trying to install the
virtual-package with this version pin.

For example, "yaml-mode" is a virtual package satisifed by
"elpa-yaml-mode" (currently 0.0.14-1) and trying to install it fails
with

 $ usr/bin/apt-get -y ... install 'yaml-mode=0.0.14-1'
 ... failed: E: Version '0.0.14-1' for 'yaml-mode' was not found ...

In the case of a virtual-package with nothing installed to satisfy it,
we should just return blank values to allow apt-get to do it's thing.

The tests are updated to install and remove this package.

Fixes: #76779
2 years ago
..
apt-builddep.yml Add Ubuntu 20.04 to CI and ansible-test (#69161) 4 years ago
apt-multiarch.yml ansible-test - Update distro containers. (#77847) 2 years ago
apt.yml apt: fix virtual package install version detection (#76781) 2 years ago
downgrade.yml apt module: add option to allow package downgrades (#74852) 3 years ago
main.yml Replace deprectated include with {import,include}_tasks in apt{,_repository,_key} integration tests (#71964) 4 years ago
repo.yml apt: add support for package version >= (#75002) 3 years ago
upgrade.yml Fixes #56832: Remove warning when falling back to apt-get if aptitude is missing. (#61782) 5 years ago
url-with-deps.yml Update ci-files URL in integration tests. 3 years ago