rpms/dbus/devel dbus-python-fix-callchain.patch, NONE, 1.1 dbus.spec, 1.67, 1.68
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Mon Jan 23 23:34:34 UTC 2006
Author: johnp
Update of /cvs/dist/rpms/dbus/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv21958
Modified Files:
dbus.spec
Added Files:
dbus-python-fix-callchain.patch
Log Message:
- Add patch to fix the python callchain
- Symlink dbus-send to /usr/bin because some applications
look for it there
dbus-python-fix-callchain.patch:
proxies.py | 96 ++++++++++++++++++++++++++++---------------------------------
1 files changed, 45 insertions(+), 51 deletions(-)
--- NEW FILE dbus-python-fix-callchain.patch ---
Index: python/proxies.py
===================================================================
RCS file: /cvs/dbus/dbus/python/proxies.py,v
retrieving revision 1.12
diff -u -r1.12 proxies.py
--- python/proxies.py 3 Nov 2005 16:13:52 -0000 1.12
+++ python/proxies.py 16 Jan 2006 21:00:20 -0000
@@ -8,11 +8,23 @@
This is returned instead of ProxyMethod when we are defering DBus calls
while waiting for introspection data to be returned
-
- This class can be used for debugging purposes
"""
+ def __init__(self, proxy_method):
+ self._proxy_method = proxy_method
+ self._method_name = proxy_method._method_name
+
def __call__(self, *args, **keywords):
- return None
+ reply_handler = None
+ if keywords.has_key('reply_handler'):
+ reply_handler = keywords['reply_handler']
+
+ #block for now even on async
+ # FIXME: put ret in async queue in future if we have a reply handler
+
+ self._proxy_method._proxy._pending_introspect.block()
+ ret = self._proxy_method (*args, **keywords)
+
+ return ret
class ProxyMethod:
"""A proxy Method.
@@ -21,19 +33,15 @@
method produce messages that travel over the Bus and are routed
to a specific named Service.
"""
- def __init__(self, connection, named_service, object_path, dbus_interface, method_name, introspect_sig):
- self._connection = connection
- self._named_service = named_service
- self._object_path = object_path
- self._method_name = method_name
- self._dbus_interface = dbus_interface
- self._introspect_sig = introspect_sig
+ def __init__(self, proxy, connection, named_service, object_path, method_name, iface):
+ self._proxy = proxy
+ self._connection = connection
+ self._named_service = named_service
+ self._object_path = object_path
+ self._method_name = method_name
+ self._dbus_interface = iface
def __call__(self, *args, **keywords):
- dbus_interface = self._dbus_interface
- if keywords.has_key('dbus_interface'):
- dbus_interface = keywords['dbus_interface']
-
timeout = -1
if keywords.has_key('timeout'):
timeout = keywords['timeout']
@@ -50,20 +58,35 @@
if keywords.has_key('ignore_reply'):
ignore_reply = keywords['ignore_reply']
+
if not(reply_handler and error_handler):
if reply_handler:
raise MissingErrorHandlerException()
elif error_handler:
raise MissingReplyHandlerException()
+ dbus_interface = self._dbus_interface
+ if keywords.has_key('dbus_interface'):
+ dbus_interface = keywords['dbus_interface']
+
+ tmp_iface = ''
+ if dbus_interface:
+ tmp_iface = dbus_interface + '.'
+
+ key = tmp_iface + self._method_name
+
+ introspect_sig = None
+ if self._proxy._introspect_method_map.has_key (key):
+ introspect_sig = self._proxy._introspect_method_map[key]
+
message = dbus_bindings.MethodCall(self._object_path, dbus_interface, self._method_name)
message.set_destination(self._named_service)
# Add the arguments to the function
iter = message.get_iter(True)
- if self._introspect_sig:
- for (arg, sig) in zip(args, dbus_bindings.Signature(self._introspect_sig)):
+ if introspect_sig:
+ for (arg, sig) in zip(args, dbus_bindings.Signature(introspect_sig)):
iter.append_strict(arg, sig)
else:
for arg in args:
@@ -176,49 +199,20 @@
self._introspect_execute_queue()
sys.stderr.write("Introspect error: " + str(error) + "\n")
- def __getattr__(self, member, **keywords):
+ def __getattr__(self, member, dbus_interface=None):
if member == '__call__':
return object.__call__
elif member.startswith('__') and member.endswith('__'):
raise AttributeError(member)
else:
- introspect_sig = None
+ ret = self.ProxyMethodClass(self, self._bus.get_connection(),
+ self._named_service,
+ self._object_path, member,
+ dbus_interface)
- iface = None
- if keywords.has_key('dbus_interface'):
- iface = keywords['dbus_interface']
-
if self._introspect_state == self.INTROSPECT_STATE_INTROSPECT_IN_PROGRESS:
- reply_handler = None
- if keywords.has_key('reply_handler'):
- reply_handler = keywords['reply_handler']
-
- error_handler = None
- if keywords.has_key('error_handler'):
- error_handler = keywords['error_handler']
-
- if not reply_handler:
- self._pending_introspect.block()
- else:
- call = (memeber, iface, args, keywords)
- self._pending_introspect_queue.append(call)
+ ret = self.DeferedMethodClass(ret)
- ret = self.DeferedMethodClass()
- return ret
-
- if self._introspect_state == self.INTROSPECT_STATE_INTROSPECT_DONE:
- tmp_iface = ''
- if iface:
- tmp_iface = iface + '.'
-
- key = tmp_iface + member
- if self._introspect_method_map.has_key (key):
- introspect_sig = self._introspect_method_map[key]
-
- ret = self.ProxyMethodClass(self._bus.get_connection(),
- self._named_service,
- self._object_path, iface, member,
- introspect_sig)
return ret
def __repr__(self):
Index: dbus.spec
===================================================================
RCS file: /cvs/dist/rpms/dbus/devel/dbus.spec,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -r1.67 -r1.68
--- dbus.spec 20 Jan 2006 23:05:51 -0000 1.67
+++ dbus.spec 23 Jan 2006 23:34:31 -0000 1.68
@@ -19,7 +19,7 @@
Summary: D-BUS message bus
Name: dbus
Version: 0.60
-Release: 6
+Release: 7
URL: http://www.freedesktop.org/software/dbus/
Source0: %{name}-%{version}.tar.gz
License: AFL/GPL
@@ -48,6 +48,7 @@
Patch1: dbus-0.32-selinux_chroot_workaround.patch
Patch2: dbus-0.60-selinux-avc-audit.patch
Patch3: dbus-0.60-start-early.patch
+Patch4: dbus-python-fix-callchain.patch
%description
@@ -134,6 +135,7 @@
%patch1 -p1 -b .selinux_chroot_workaround
%patch2 -p1 -b .selinux-avc-audit
%patch3 -p1 -b .start-early
+%patch4 -p0 -b .python-callchain
autoreconf -f -i
@@ -206,23 +208,38 @@
mv -f $RPM_BUILD_ROOT%{_bindir}/dbus-send $RPM_BUILD_ROOT/bin
mv -f $RPM_BUILD_ROOT%{_bindir}/dbus-cleanup-sockets $RPM_BUILD_ROOT/bin
-# We need to make relative links to the moved libaries
-# Create a dummy file so that no matter how deep %%{_libdir} is, we can
+# Create a dummy file so that no matter how deep we are we can
# find the root directory.
touch $RPM_BUILD_ROOT/rootfile
+
+# We need to make relative links to dbus-send
+# Search for the file relative to the location of %%{_bindir}.
+root=..
+while [ ! -e $RPM_BUILD_ROOT/%{_bindir}/${root}/rootfile ] ; do
+ root=${root}/..
+done
+
+# Actually create the link.
+pushd $RPM_BUILD_ROOT/%{_bindir}
+ln -f -s ${root}/bin/dbus-send dbus-send
+popd
+
+
+# We need to make relative links to the moved libaries
# Search for the file relative to the location of %%{_libdir}.
root=..
while [ ! -e $RPM_BUILD_ROOT/%{_libdir}/${root}/rootfile ] ; do
root=${root}/..
- done
- # Actually create the link.
- pushd $RPM_BUILD_ROOT/%{_libdir}
- for so_file in *dbus-1*.so ; do
- ln -f -s ${root}/%{_lib}/$so_file.? $so_file
- done
- popd
- # Clean it up.
- rm $RPM_BUILD_ROOT/rootfile
+done
+
+# Actually create the link.
+pushd $RPM_BUILD_ROOT/%{_libdir}
+for so_file in *dbus-1*.so ; do
+ ln -f -s ${root}/%{_lib}/$so_file.? $so_file
+done
+popd
+# Clean it up.
+rm $RPM_BUILD_ROOT/rootfile
## %find_lang %{gettext_package}
@@ -262,6 +279,7 @@
%dir %{_libdir}/dbus-1.0
/bin/dbus-daemon
/bin/dbus-send
+%{_bindir}/dbus-send
/bin/dbus-cleanup-sockets
/%{_lib}/*dbus-1*.so.*
%{_datadir}/man/man*/*
@@ -318,6 +336,11 @@
%endif
%changelog
+* Mon Jan 23 2006 John (J5) Palmieri <johnp at redhat.com> 0.60-7
+- Add patch to fix the python callchain
+- Symlink dbus-send to /usr/bin because some applications
+ look for it there
+
* Fri Jan 20 2006 John (J5) Palmieri <johnp at redhat.com> 0.60-6
- Fix up patch to init script so it refrences /bin not /usr/bin
More information about the fedora-cvs-commits
mailing list