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
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
3 years ago
..
ansible_test ansible-test - Move code from _data to _util. (#75495) 3 years ago
integration apt: fix virtual package install version detection (#76781) 3 years ago
lib/ansible_test ansible-test - Add RHEL 9 / FreeBSD 13.1 remotes. (#77851) 3 years ago
sanity Fix ansible-galaxy traceback when unexpected version of resolvelib is installed (#77630) 3 years ago
support Remove collections compat from controller code. 3 years ago
units Add toggle to fix module_defaults with module-as-redirected-action on a per-module basis (#77265) 3 years ago
utils/shippable Fix Windows CI scripts. 3 years ago