Merge pull request #2226 from etdub/develop

Check if the pkg.arch is 'noarch'
This commit is contained in:
Thomas S Hatch 2012-10-11 17:44:43 -07:00
commit ddb7b25db8

View File

@ -88,7 +88,7 @@ def list_upgrades(*args):
for pkg in pkgs:
exactmatch, matched, unmatched = yum.packages.parsePackages(pl, [pkg])
for pkg in exactmatch:
if pkg.arch == getBaseArch():
if pkg.arch == getBaseArch() or pkg.arch == 'noarch':
versions_list[pkg['name']] = '-'.join([pkg['version'],pkg['release']])
return versions_list
@ -114,7 +114,7 @@ def available_version(name):
# installed. Maybe we should just return the value if we get a hit
# on available, and only iterate though updates if we don't..
for pkg in exactmatch:
if pkg.arch == getBaseArch():
if pkg.arch == getBaseArch() or pkg.arch == 'noarch':
versions_list.append('-'.join([pkg.version, pkg.release]))
if len(versions_list) == 0: