--- smart/backends/rpm/redcarpet.py.orig 2006-11-07 21:08:33.000000000 +0100 +++ smart/backends/rpm/redcarpet.py 2006-11-07 21:08:43.000000000 +0100 @@ -191,7 +191,7 @@ self._release = data def handleArchEnd(self, name, attrs, data): - if rpm.archscore(data) == 0: + if archscore(data) == 0: self._skip = self.PACKAGE else: self._arch = data --- smart/backends/rpm/base.py.orig 2006-11-07 21:02:12.000000000 +0100 +++ smart/backends/rpm/base.py 2006-11-07 21:06:17.000000000 +0100 @@ -37,11 +37,17 @@ except ImportError: raise Error, _("'rpm' python module is not available") -archscore = rpm.archscore + +def archscore(arch): + if sysconf.get("rpm-enable-biarch", True): + return rpm.archscore(arch) + if os.uname()[4] == 'x86_64' and arch != 'x86_64': + return 0 + return rpm.archscore(arch) __all__ = ["RPMPackage", "RPMProvides", "RPMNameProvides", "RPMPreRequires", "RPMRequires", "RPMUpgrades", "RPMConflicts", "RPMObsoletes", - "rpm", "getTS"] + "rpm", "getTS", "archscore"] def getTS(new=False): if not hasattr(getTS, "ts"): @@ -91,6 +97,13 @@ def equals(self, other): if self.name != other.name or self.version != other.version: return False + + if not sysconf.get("rpm-enable-biarch", True): + selfver, selfarch = splitarch(self.version) + otherver, otherarch = splitarch(other.version) + if selfarch != otherarch: + return False + if Package.equals(self, other): return True fk = dict.fromkeys @@ -133,8 +146,9 @@ return False selfver, selfarch = splitarch(self.version) otherver, otherarch = splitarch(other.version) - if getArchColor(selfarch) != getArchColor(otherarch): - return True + if sysconf.get("rpm-enable-biarch", True): + if getArchColor(selfarch) != getArchColor(otherarch): + return True if not pkgconf.testFlag("multi-version", self): return False return selfver != otherver --- smart/backends/rpm/synthesis.py.orig 2006-11-07 21:07:25.000000000 +0100 +++ smart/backends/rpm/synthesis.py 2006-11-07 21:07:50.000000000 +0100 @@ -165,7 +165,7 @@ version, arch = version[:dot], version[dot+1:] versionarch = "@".join((version, arch)) - if rpm.archscore(arch) == 0: + if archscore(arch) == 0: continue name = "-".join(rpmnameparts[0:-2]) --- smart/backends/rpm/yast2.py.orig 2006-11-07 21:09:45.000000000 +0100 +++ smart/backends/rpm/yast2.py 2006-11-07 21:09:51.000000000 +0100 @@ -175,7 +175,7 @@ nameparts = entryname.split(" ") # skip entry if arch is not compatible arch = nameparts[3] - if rpm.archscore(arch) <= 0: + if archscore(arch) <= 0: return name = nameparts[0] self.curpkgname = name --- smart/backends/rpm/header.py.orig 2006-11-07 21:06:49.000000000 +0100 +++ smart/backends/rpm/header.py 2006-11-07 21:07:11.000000000 +0100 @@ -203,7 +203,7 @@ if h[1106]: # RPMTAG_SOURCEPACKAGE continue arch = h[1022] # RPMTAG_ARCH - if rpm.archscore(arch) == 0: + if archscore(arch) == 0: continue name = h[1000] # RPMTAG_NAME --- smart/backends/rpm/metadata.py.orig 2006-11-07 21:08:01.000000000 +0100 +++ smart/backends/rpm/metadata.py 2006-11-07 21:08:16.000000000 +0100 @@ -160,7 +160,7 @@ skip = None elif tag == ARCH: - if rpm.archscore(elem.text) == 0: + if archscore(elem.text) == 0: skip = PACKAGE else: arch = elem.text