[packagekit] Problems with GPK and Yum Plugins

Richard Hughes hughsient at gmail.com
Tue Sep 21 04:23:05 PDT 2010


On 21 September 2010 12:06,  <rotru at br.ibm.com> wrote:
> I have an Yum Plugin that adds some repositories dynamically to yum every
> time it runs.
> In the command line Yum works perfectly, and the same result was seen in
> gnome-packagekit apps.
> But recently gpk-application and gpk-update-viewer are not working anymore
> with the plugin.

The GUI tools don't actually run yum or the plugin code, that's done
by the packagekitd daemon.

> 1- I used to add the repositories in the "init hook", but, in latest GPK
> versions for F13 I started to get this error:
>
> Traceback (most recent call last):
>  File "/usr/share/PackageKit/helpers/yum/yumBackend.py", line 3270, in
> __init__
>    self.repos.confirm_func = self._repo_gpg_confirm
>  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 814, in
> <lambda>
>    repos = property(fget=lambda self: self._getRepos(),
>  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 542, in
> _getRepos
>    prerepoconf = self.prerepoconf
> AttributeError: 'PackageKitYumBase' object has no attribute 'prerepoconf'


What version PackageKit and yum are you using? Could you upload your
yum plugin somewhere public also please.

> 2-  Using prereposetup or postreposetup the error above disappears and
> gpk-update-viewer, in a first step, finds the repos and the updates
> available
> from them. BUT, when I try to update, it returns an error saying the
> repository was not found !!!

It depends on how your plugin works. PackageKit does some things a
little bit different to yum.

> - What is GPK doing with the yum-plugins ? Should not it have the same
> behavior that YUM in command line ?

No. PackageKit is doing different things with the data, and is
exporting it in a different way to using the bare yum api.

> - How can I add dynamic repositories to Yum and use them with GPK ?
> - Is this a potential bug, as I get the behavior desired in the command
> line?

What's your use case for adding and removing repos like you're suggesting?

Richard.



More information about the PackageKit mailing list