Allow foo=1.0* like expressions in apt

pull/18777/head
Michael Vogt 10 years ago committed by Matt Clay
parent 4e2d05b1f3
commit 80d520dde8

@ -229,7 +229,8 @@ def expand_dpkg_options(dpkg_options_compressed):
def expand_pkgspec_from_fnmatches(m, pkgspec, cache): def expand_pkgspec_from_fnmatches(m, pkgspec, cache):
new_pkgspec = [] 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 # 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 [c for c in pkgname_or_fnmatch_pattern if c in "*?[]!"]:
if "=" in pkgname_or_fnmatch_pattern: if "=" in pkgname_or_fnmatch_pattern:
@ -249,7 +250,7 @@ def expand_pkgspec_from_fnmatches(m, pkgspec, cache):
else: else:
new_pkgspec.extend(matches) new_pkgspec.extend(matches)
else: else:
new_pkgspec.append(pkgname_or_fnmatch_pattern) new_pkgspec.append(name_or_fnmatch_or_version)
return new_pkgspec return new_pkgspec
def install(m, pkgspec, cache, upgrade=False, default_release=None, def install(m, pkgspec, cache, upgrade=False, default_release=None,

Loading…
Cancel
Save