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.add_enable_repo('f13',
|
||||
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',
|
||||
baseurls=['http://fedora.mirrors.tds.net/pub/fedora/releases/12/Everything/source/SRPMS/'])
|
||||
my.add_enable_repo('f12-updates',
|
||||
|
@ -20,18 +22,24 @@ my.add_enable_repo('f12-updates',
|
|||
len(my.pkgSack) # just to frob the sack
|
||||
|
||||
f13repo = my.repos.findRepos('f13')[0]
|
||||
f13updates = my.repos.findRepos('f13-updates')[0]
|
||||
|
||||
for pkg in my.pkgSack.returnNewestByNameArch():
|
||||
if pkg.repoid != 'f13':
|
||||
for pkg in sorted(my.pkgSack.returnNewestByNameArch()):
|
||||
if not pkg.repoid.startswith('f13'):
|
||||
f13pkgs = []
|
||||
f13upkgs = []
|
||||
f13all = []
|
||||
try:
|
||||
f13pkgs = f13repo.sack.returnNewestByNameArch((pkg.name, pkg.arch))
|
||||
f13upkgs = f13updates.sack.returnNewestByNameArch((pkg.name, pkg.arch))
|
||||
except yum.Errors.PackageSackError, e:
|
||||
f13pkgs = []
|
||||
|
||||
if f13pkgs:
|
||||
if f13pkgs[0].EVR != pkg.EVR:
|
||||
pass
|
||||
f13all.extend(f13upkgs)
|
||||
f13all.extend(f13pkgs)
|
||||
if f13all:
|
||||
f13all.sort()
|
||||
f13all.reverse()
|
||||
if f13all[0].EVR != pkg.EVR:
|
||||
print 'greater for f12: %s' % pkg.name
|
||||
print ' f12 = %s' % pkg
|
||||
print ' f13 = %s' % f13pkgs[0]
|
||||
else:
|
||||
print 'not in f13 at all: %s' % pkg.name
|
||||
print ' f13 = %s' % f13all[0]
|
Loading…
Add table
Add a link
Reference in a new issue