From 1e56dece34e9d0b20c44862bf277849238b89110 Mon Sep 17 00:00:00 2001 From: Shad L. Lords Date: Mon, 19 Oct 2009 08:02:45 -0600 Subject: [PATCH 03/17] Always pick best arch for package --- findpackageset.py | 24 +++++++++--------------- 1 files changed, 9 insertions(+), 15 deletions(-) diff --git a/findpackageset.py b/findpackageset.py index bb21691..6f79e51 100644 --- a/findpackageset.py +++ b/findpackageset.py @@ -108,21 +108,15 @@ def findpackageset(hdrlist, dbPath='/'): # loop through packages and find ones which are a newer # version than what we have for ( name, arch ) in instDict.keys(): - if ( name, arch ) in availDict.keys(): - # Exact arch upgrade - h = instDict[(name, arch)] - pkg = availDict[(name,arch)] - comparePackageForUpgrade(updDict, h, pkg) - else: - # See if we have a better arch than that installed - if name in availNames.keys(): - bestarch = findBestArch(availNames[name]) - if not bestarch: - continue - if availDict.has_key((name,bestarch)): - h = instDict[(name,arch)] - pkg = availDict[(name,bestarch)] - comparePackageForUpgrade(updDict, h, pkg) + # See if we have a better arch than that installed + if name in availNames.keys(): + bestarch = findBestArch(availNames[name]) + if not bestarch: + continue + if availDict.has_key((name,bestarch)): + h = instDict[(name,arch)] + pkg = availDict[(name,bestarch)] + comparePackageForUpgrade(updDict, h, pkg) # handle obsoletes for pkg in hdlist: -- 1.7.1