From: Zac Medico Date: Wed, 10 Jan 2007 11:25:06 +0000 (-0000) Subject: Minor fixes for the =* operator (I hope we're done now :). X-Git-Tag: v2.1.2~111 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=5824aa69a7e701e092051302e7f037f15371a7f2;p=portage.git Minor fixes for the =* operator (I hope we're done now :). svn path=/main/trunk/; revision=5520 --- diff --git a/pym/portage_dep.py b/pym/portage_dep.py index c488aa948..c27d4307e 100644 --- a/pym/portage_dep.py +++ b/pym/portage_dep.py @@ -588,12 +588,15 @@ def match_from_list(mydep, candidate_list): # use vercmp mysplit = catpkgsplit(mycpv) myver = mysplit[2].lstrip("0") - if not myver[0].isdigit() - mver = "0"+myver + if not myver or not myver[0].isdigit(): + myver = "0"+myver mycpv = mysplit[0]+"/"+mysplit[1]+"-"+myver for x in candidate_list: xs = catpkgsplit(x) - xcpv = xs[0]+"/"+xs[1]+"-"+xs[2].lstrip("0") + myver = xs[2].lstrip("0") + if not myver or not myver[0].isdigit(): + myver = "0"+myver + xcpv = xs[0]+"/"+xs[1]+"-"+myver xcpv = x[:min(len(x), len(mycpv))] if xcpv == mycpv: mylist.append(x)