updating newer_packages
This commit is contained in:
parent
2e883c6be2
commit
7a7ba119d9
1 changed files with 17 additions and 9 deletions
|
@ -12,6 +12,8 @@ my.setCacheDir()
|
||||||
my.repos.disableRepo('*')
|
my.repos.disableRepo('*')
|
||||||
my.add_enable_repo('f13',
|
my.add_enable_repo('f13',
|
||||||
baseurls=['http://fedora.mirrors.tds.net/pub/fedora/development/13/source/SRPMS/'])
|
baseurls=['http://fedora.mirrors.tds.net/pub/fedora/development/13/source/SRPMS/'])
|
||||||
|
my.add_enable_repo('f13-updates',
|
||||||
|
baseurls=['http://download.fedora.redhat.com/pub/fedora/linux/updates/testing/13/SRPMS/'])
|
||||||
my.add_enable_repo('f12',
|
my.add_enable_repo('f12',
|
||||||
baseurls=['http://fedora.mirrors.tds.net/pub/fedora/releases/12/Everything/source/SRPMS/'])
|
baseurls=['http://fedora.mirrors.tds.net/pub/fedora/releases/12/Everything/source/SRPMS/'])
|
||||||
my.add_enable_repo('f12-updates',
|
my.add_enable_repo('f12-updates',
|
||||||
|
@ -20,18 +22,24 @@ my.add_enable_repo('f12-updates',
|
||||||
len(my.pkgSack) # just to frob the sack
|
len(my.pkgSack) # just to frob the sack
|
||||||
|
|
||||||
f13repo = my.repos.findRepos('f13')[0]
|
f13repo = my.repos.findRepos('f13')[0]
|
||||||
|
f13updates = my.repos.findRepos('f13-updates')[0]
|
||||||
|
|
||||||
for pkg in my.pkgSack.returnNewestByNameArch():
|
for pkg in sorted(my.pkgSack.returnNewestByNameArch()):
|
||||||
if pkg.repoid != 'f13':
|
if not pkg.repoid.startswith('f13'):
|
||||||
|
f13pkgs = []
|
||||||
|
f13upkgs = []
|
||||||
|
f13all = []
|
||||||
try:
|
try:
|
||||||
f13pkgs = f13repo.sack.returnNewestByNameArch((pkg.name, pkg.arch))
|
f13pkgs = f13repo.sack.returnNewestByNameArch((pkg.name, pkg.arch))
|
||||||
|
f13upkgs = f13updates.sack.returnNewestByNameArch((pkg.name, pkg.arch))
|
||||||
except yum.Errors.PackageSackError, e:
|
except yum.Errors.PackageSackError, e:
|
||||||
f13pkgs = []
|
pass
|
||||||
|
f13all.extend(f13upkgs)
|
||||||
if f13pkgs:
|
f13all.extend(f13pkgs)
|
||||||
if f13pkgs[0].EVR != pkg.EVR:
|
if f13all:
|
||||||
|
f13all.sort()
|
||||||
|
f13all.reverse()
|
||||||
|
if f13all[0].EVR != pkg.EVR:
|
||||||
print 'greater for f12: %s' % pkg.name
|
print 'greater for f12: %s' % pkg.name
|
||||||
print ' f12 = %s' % pkg
|
print ' f12 = %s' % pkg
|
||||||
print ' f13 = %s' % f13pkgs[0]
|
print ' f13 = %s' % f13all[0]
|
||||||
else:
|
|
||||||
print 'not in f13 at all: %s' % pkg.name
|
|
Loading…
Add table
Add a link
Reference in a new issue