[packagekit] severity information in the yum backend

Matthias Clasen matthias.clasen at gmail.com
Mon Dec 31 23:36:02 PST 2007


Hey, I spent some time tonight trying to get severity information to
work with the yum backend,
but failed.

To test this, I created a minimal "someapp" rpm and set up a yum
repository with a fake security update
for someapp. The updateinfo.xml was handwritten, then added to the
repo with modifyrepo. I spent some time
tweaking it until yum parsed it without choking.  I'd be happy to make
this testcase available somewhere, if
people are interested.

After adding the repo to my yum configuration, the update showed up in
pk-update-viewer, but as a normal
update. After some poking around (essentially blind poking, I'm a
Python illiterate), I figured out that the
yum backend probably needs this patch:

--- a/backends/yum/helpers/yumBackend.py
+++ b/backends/yum/helpers/yumBackend.py
@@ -1059,7 +1059,7 @@ class PackageKitYumBackend(PackageKitBaseBackend):
             self._updateMetadata = UpdateMetadata()
             for repo in self.yumbase.repos.listEnabled():
                 try:
-                    md.add(repo)
+                    self._updateMetadata.add(repo)
                 except:
                     pass # No updateinfo.xml.gz in repo
         return self._updateMetadata


Matthias



More information about the PackageKit mailing list