Skip to content

Commit

Permalink
Add a fuzzy matcher for numbers in format_missing_requires. BZ 718245.
Browse files Browse the repository at this point in the history
  • Loading branch information
james-antill committed May 28, 2013
1 parent 1230989 commit a3c07d8
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions output.py
Original file line number Diff line number Diff line change
Expand Up @@ -2886,6 +2886,18 @@ def _msg_pkg(action, pkg, needname):
for pkgtup in pkg.matchingPrcos('provides', needtup):
done = True
msg += _('\n %s') % yum.misc.prco_tuple_to_string(pkgtup)
if not done:
nneedname = needname.translate(None, "0123456789")
if nneedname != needname:
# Sometimes things change numbers, so compare without.
# Eg. libXYZ.so.0() libXYZ.so.1()
for pkgtup in pkg.provides:
name = pkgtup[0]
name = name.translate(None, "0123456789")
if name == nneedname:
done = True
pkgtup = yum.misc.prco_tuple_to_string(pkgtup)
msg += _('\n ~%s') % pkgtup
if not done:
msg += _('\n Not found')
return msg
Expand Down

0 comments on commit a3c07d8

Please sign in to comment.