[packagekit] Seporating the obsoletes and updates
Richard Hughes
hughsient at gmail.com
Wed May 28 07:06:12 PDT 2008
This is the code we use in yumBackend.py
def _get_obsoleted(self,name):
obsoletes = self.yumbase.up.getObsoletesTuples(newest=1)
for (obsoleting,installed) in obsoletes:
if obsoleting[0] == name:
pkg = self.yumbase.rpmdb.searchPkgTuple(installed)[0]
return self._pkg_to_id(pkg)
return ""
def _get_updated(self,pkg):
updated = None
pkgs = self.yumbase.rpmdb.searchNevra(name=pkg.name)
if pkgs:
return self._pkg_to_id(pkgs[0])
else:
return ""
We need to return the list delimited with "^". In 0.3.x we'll switch
obsoletes and updates to be a proper 'as' (rather than 's') types, but I
don't want to break API in 0.2.x again for just this reason.
Robin/Luke/Tim, could you fix up that yum and yum2 code to do the right
thing pls, and I'll patch the daemon and client tools.
Thanks.
Richard
More information about the PackageKit
mailing list