#! /usr/bin/python -tt import sys import yum from rpmUtils.arch import canCoinstall yb = yum.YumBase() if True: yb.repos.enableRepo('fedora-debuginfo,updates-debuginfo') yb.repos.enableRepo('updates-testing,updates-testing-debuginfo') yb.repos.enableRepo('rawhide,rawhide-debuginfo') def tst(pkg, opkg): if pkg.arch == opkg.arch: return if not pkg.verEQ(opkg): return if canCoinstall(pkg.arch, opkg.arch): return # Same type of arch, but not the same. So prco data _must_ be equal if set(pkg.provides) != set(opkg.provides): print " ** Error: provides !=" print " ** ", pkg print " ** ", opkg if set(pkg.requires) != set(opkg.requires): print " ** Error: requires !=", pkg, opkg print " ** ", pkg print " ** ", opkg if set(pkg.conflicts) != set(opkg.conflicts): print " ** Error: conflicts !=", pkg, opkg print " ** ", pkg print " ** ", opkg if set(pkg.obsoletes) != set(opkg.obsoletes): print " ** Error: obsoletes !=", pkg, opkg print " ** ", pkg print " ** ", opkg # Speed up # # for pkg in yb.pkgSack: # for opkg in yb.pkgSack.searchNames(names=[pkg.name]): pkgs = {} for pkg in yb.pkgSack: pkgs.setdefault(pkg.name, []).append(pkg) for pkgname in pkgs: while pkgs[pkgname]: pkg = pkgs[pkgname].pop() for opkg in pkgs[pkgname]: tst(pkg, opkg)