=== modified file 'smart/cache.py' --- smart/cache.py 2008-08-01 22:17:02 +0000 +++ smart/cache.py 2008-08-07 14:13:28 +0000 @@ -239,6 +239,37 @@ def __lt__(self, other): return self._order < other._order +class ErrataInfo(object): + def __init__(self, package): + self._package = package + + def getPackage(self): + return self._package + + def getID(self): + return None + + def getURL(self): + return None + + def getType(self): + return None + + def getDate(self): + return None + + def getSeverity(self): + return None + + def getSummary(self): + return "" + + def getDescription(self): + return "" + + def getReferenceURLs(self): + return [] + class Provides(object): def __init__(self, name, version): self.name = name @@ -325,6 +356,17 @@ class Upgrades(Depends): pass class Conflicts(Depends): pass +class Errata(object): + + def load(self): + pass + + def getType(self, package): + return None + + def getInfo(self, package): + return None + class Loader(object): def __init__(self): @@ -360,6 +402,9 @@ def getInfo(self, pkg): return None + def getErrata(self, pkg): + return None + def reset(self): del self._packages[:] === modified file 'smart/commands/info.py' --- smart/commands/info.py 2008-08-01 21:48:17 +0000 +++ smart/commands/info.py 2008-08-07 14:04:37 +0000 @@ -42,6 +42,8 @@ parser = OptionParser(usage=USAGE, description=DESCRIPTION, examples=EXAMPLES) + parser.add_option("--errata", action="store_true", + help=_("show errata info")) parser.add_option("--urls", action="store_true", help=_("show URLs")) parser.add_option("--paths", action="store_true", @@ -142,6 +144,26 @@ line = "." print "", line + if opts.errata: + seen = {} + print _("Errata:") + for loader in pkg.loaders: + if loader not in seen: + seen[loader] = True + errata = loader.getErrata(pkg) + if errata: + print " ", _("ID:"), errata.getID() + print " ", _("URL:"), errata.getURL() + print " ", _("Type:"), errata.getType() + print " ", _("Date:"), errata.getDate() + print " ", _("Summary:"), errata.getSummary() + print " ", _("Description:") + for line in errata.getDescription().splitlines(): + line = line.strip() + if not line: + line = "." + print "", " ", line + if opts.urls: print _("URLs:") seen = {}