mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-27 02:30:22 -07:00
Allow foo=1.0* like expressions in apt
This commit is contained in:
parent
4e2d05b1f3
commit
80d520dde8
1 changed files with 3 additions and 2 deletions
|
@ -229,7 +229,8 @@ def expand_dpkg_options(dpkg_options_compressed):
|
|||
|
||||
def expand_pkgspec_from_fnmatches(m, pkgspec, cache):
|
||||
new_pkgspec = []
|
||||
for pkgname_or_fnmatch_pattern in pkgspec:
|
||||
for name_or_fnmatch_or_version in pkgspec:
|
||||
pkgname_or_fnmatch_pattern = name_or_fnmatch_or_version.split("=")[0]
|
||||
# note that any of these chars is not allowed in a (debian) pkgname
|
||||
if [c for c in pkgname_or_fnmatch_pattern if c in "*?[]!"]:
|
||||
if "=" in pkgname_or_fnmatch_pattern:
|
||||
|
@ -249,7 +250,7 @@ def expand_pkgspec_from_fnmatches(m, pkgspec, cache):
|
|||
else:
|
||||
new_pkgspec.extend(matches)
|
||||
else:
|
||||
new_pkgspec.append(pkgname_or_fnmatch_pattern)
|
||||
new_pkgspec.append(name_or_fnmatch_or_version)
|
||||
return new_pkgspec
|
||||
|
||||
def install(m, pkgspec, cache, upgrade=False, default_release=None,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue