From: Marius Mauch Date: Wed, 10 Jan 2007 08:55:31 +0000 (-0000) Subject: Make the =* operator more robust X-Git-Tag: v2.1.2~117 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=f97493fccfa149106683cccaa21965502bb59903;p=portage.git Make the =* operator more robust svn path=/main/trunk/; revision=5514 --- diff --git a/pym/portage_dep.py b/pym/portage_dep.py index 0cb49691d..a528f7026 100644 --- a/pym/portage_dep.py +++ b/pym/portage_dep.py @@ -583,10 +583,15 @@ def match_from_list(mydep, candidate_list): mylist = [cpv for cpv in candidate_list if cpvequal(cpv, mycpv)] elif operator == "=*": # glob match - # The old verion ignored _tag suffixes... This one doesn't. for x in candidate_list: - if cpvequal(x[0:len(mycpv)], mycpv): + xcpv = x[:min(len(x), len(mycpv))] + if xcpv == mycpv: mylist.append(x) + else: + while not isspecific(xcpv): + xcpv = xcpv[:-1] + if cpvequal(xcpv, mycpv): + mylist.append(x) elif operator == "~": # version, any revision, match for x in candidate_list: