[packagekit] Get Depends problem with the yum backend

Richard Hughes hughsient at gmail.com
Wed Oct 3 10:56:28 PDT 2007


sudo /usr/share/PackageKit/helpers/yum/get-depends.py "gnome-power-manager;2.20.0-1.fc8;i386;development-debuginfo"
gnome-power-manager 0 2.20.0 1.fc8 i386
Traceback (most recent call last):
  File "/usr/share/PackageKit/helpers/yum/get-depends.py", line 17, in <module>
    backend.get_depends(package)
  File "/usr/share/PackageKit/helpers/yum/yumBackend.py", line 259, in get_depends
    self.package(id, PK_INFO_ENUM_UNKNOWN, pkg.summary)
NameError: global name 'PK_INFO_ENUM_UNKNOWN' is not defined

Comes from this code:

        for pkg in results.values():
            if pkg.name != name:
                pkgver = self._get_package_ver(pkg)            
                id = self.get_package_id(pkg.name, pkgver, pkg.arch, pkg.repo)
                # TODO: we need to find out if this is installed or not...
                self.package(id, PK_INFO_ENUM_UNKNOWN, pkg.summary)

Also, why is "gnome-power-manager 0 2.20.0 1.fc8 i386" emitted to stdout?

Could we fix this to return the right state, or should I define the
PK_INFO_ENUM_UNKNOWN just for now? The first fix is the first one
obviously.

Richard.





More information about the PackageKit mailing list