[yum-commits] Branch 'yum-3_2_X' - 2 commits - yum/__init__.py yum/update_md.py
James Antill
james at osuosl.org
Mon Mar 30 17:48:00 UTC 2009
yum/__init__.py | 9 +++++++++
yum/update_md.py | 8 +++++++-
2 files changed, 16 insertions(+), 1 deletion(-)
New commits:
commit c619d23bd8f4cc838832308681b985f490ebb91a
Author: James Antill <james at and.org>
Date: Mon Mar 30 13:47:54 2009 -0400
Add repos arg. to __init__ for UpdateMetadata
diff --git a/yum/update_md.py b/yum/update_md.py
index bd87c31..9b1f07b 100644
--- a/yum/update_md.py
+++ b/yum/update_md.py
@@ -27,6 +27,7 @@ import gzip
from yum.i18n import utf8_text_wrap, to_utf8
from yum.yumRepo import YumRepository
from yum.misc import to_xml
+import Errors
import rpmUtils.miscutils
@@ -295,11 +296,16 @@ class UpdateMetadata(object):
The root update metadata object.
"""
- def __init__(self):
+ def __init__(self, repos=[]):
self._notices = {}
self._cache = {} # a pkg nvr => notice cache for quick lookups
self._no_cache = {} # a pkg name only => notice list
self._repos = [] # list of repo ids that we've parsed
+ for repo in repos:
+ try: # attempt to grab the updateinfo.xml.gz from the repodata
+ self.add(repo)
+ except Errors.RepoMDError:
+ continue # No metadata found for this repo
def get_notices(self, name=None):
""" Return all notices. """
commit 1dcc4dcbe931208a54fb7500b09a746d62d903e4
Author: James Antill <james at and.org>
Date: Mon Mar 30 11:49:06 2009 -0400
Allow pkgtup as an arg. to install/update/remove/etc.
diff --git a/yum/__init__.py b/yum/__init__.py
index 62f2b4e..94fb2c6 100644
--- a/yum/__init__.py
+++ b/yum/__init__.py
@@ -3214,6 +3214,15 @@ class YumBase(depsolve.Depsolve):
returndict = {}
+ if 'pkgtup' in kwargs:
+ (n, a, e, v, r) = kwargs['pkgtup']
+ returndict['name'] = n
+ returndict['epoch'] = e
+ returndict['arch'] = a
+ returndict['version'] = v
+ returndict['release'] = r
+ return returndict
+
returndict['name'] = kwargs.get('name')
returndict['epoch'] = kwargs.get('epoch')
returndict['arch'] = kwargs.get('arch')
More information about the Yum-commits
mailing list