[packagekit] Problems with GPK and Yum Plugins
rotru at br.ibm.com
rotru at br.ibm.com
Tue Sep 21 04:06:11 PDT 2010
Hi all,
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.
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'
Ok, I thought this might not be the right hook to add a repo, I should use
prereposetup or postreposetup instead.
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 !!!
Seems it runs the RPM transaction without consider the YUM configurations.
Same behavior for gpk-application: It finds the repos and the packages in
a first step, but, clicking in the package to get its information, it says
it cannot
find the repo.
So, my doubts are:
- What is GPK doing with the yum-plugins ? Should not it have the same
behavior that YUM in command line ?
- 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?
Regards
Rodrigo Trujillo
From:
Zhang Qiang <qiang.z.zhang at intel.com>
To:
hughsient at gmail.com, michael.meeks at novell.com,
packagekit at lists.freedesktop.org
Cc:
anas.nashif at intel.com
Date:
20/09/2010 22:53
Subject:
[packagekit] [PATCH] Send correct network state for connman end
Sent by:
packagekit-bounces+rotru=br.ibm.com at lists.freedesktop.org
Currently, packagekitd accept a bool type of connman network state, and
this patch transfer the correct connman network state (offline/online) to
packagekitd. Without this patch packagekitd/application will get the
incorrect
network state notification.
---
src/pk-network-stack-connman.c | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/src/pk-network-stack-connman.c
b/src/pk-network-stack-connman.c
index a05b1d8..f28150c 100644
--- a/src/pk-network-stack-connman.c
+++ b/src/pk-network-stack-connman.c
@@ -179,7 +179,7 @@ static void
pk_network_stack_connman_state_changed (DBusGProxy *proxy, const char
*property,
GValue *value, gpointer user_data)
{
- gboolean ret;
+ PkNetworkEnum network_state;
PkNetworkStackConnman *nstack_connman =
(PkNetworkStackConnman *) user_data;
g_return_if_fail (PK_IS_NETWORK_STACK_CONNMAN
(nstack_connman));
@@ -189,12 +189,11 @@ pk_network_stack_connman_state_changed (DBusGProxy
*proxy, const char *property,
state = g_value_dup_string (value);
if (g_str_equal (state, "online") ==
TRUE)
- ret = TRUE;
+ network_state =
PK_NETWORK_ENUM_ONLINE;
else
- ret = FALSE;
- /* TODO: this is a PkNetworkState, not a
gboolean */
- egg_debug ("emitting
network-state-changed: %s", pk_network_enum_to_string (ret));
- g_signal_emit_by_name (PK_NETWORK_STACK
(nstack_connman), "state-changed", ret);
+ network_state =
PK_NETWORK_ENUM_OFFLINE;
+ egg_debug ("emitting
network-state-changed: %s", pk_network_enum_to_string (network_state));
+ g_signal_emit_by_name (PK_NETWORK_STACK
(nstack_connman), "state-changed", network_state);
}
}
--
1.7.2.2
_______________________________________________
PackageKit mailing list
PackageKit at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/packagekit
More information about the PackageKit
mailing list