http://bugzilla.novell.com/show_bug.cgi?id=565930
http://bugzilla.novell.com/show_bug.cgi?id=565930#c1
--- Comment #1 from Stefan Schubert 2009-12-18 12:08:02 UTC ---
The interesting point is that after adding signal handling for the error:
----------------------------------------------------------------------
diff --git a/plugins/patches/app/models/resolvable.rb
b/plugins/patches/app/models/resolvable.rb
index 09b1795..7b9acc3 100644
--- a/plugins/patches/app/models/resolvable.rb
+++ b/plugins/patches/app/models/resolvable.rb
@@ -7,6 +7,23 @@ require 'thread'
require 'exceptions'
+class PackageKitError < BackendException
+ def initialize(description)
+ @description = description
+ super("PackageKit error")
+ end
+
+ def to_xml
+ xml = Builder::XmlMarkup.new({})
+ xml.instruct!
+
+ xml.error do
+ xml.type "PACKAGEKIT_ERROR"
+ xml.description @description
+ end
+ end
+end
+
class Resolvable
attr_accessor :resolvable_id,
@@ -124,7 +141,18 @@ public
proxy = transaction_iface.object
proxy.on_signal(signal.to_s, &block)
- proxy.on_signal("Error") {|u1,u2| dbusloop.quit }
+ proxy.on_signal("ErrorCode") {|u1,u2|
+ error_string = "#{u1}: #{u2}"
+ Rails.logger.error error_string
+ dbusloop.quit
+ raise PackageKitError.new(error_string)
+ }
+ proxy.on_signal("RepoSignatureRequired") {|u1,u2,u3,u4,u5,u6,u7,u8|
+ error_string = "Repository #{u2} needs to be signed"
+ Rails.logger.error error_string
+ dbusloop.quit
+ raise PackageKitError.new(error_string)
+ }
proxy.on_signal("Finished") {|u1,u2| dbusloop.quit }
# Do the call only when all signal handlers are in place,
# otherwise Finished can arrive early and dbusloop will never
---------------------------------------------------------------------
Following exception will be generated:
<error>
<type>GENERIC</type>
<description>return can't jump across threads</description>
<bug type="boolean">true</bug>
−
<backtrace type="array">
−
<line>
/usr/lib/ruby/site_ruby/1.8/dbus/bus.rb:339:in `introspect_data'
</line>
−
<line>
/usr/lib/ruby/site_ruby/1.8/dbus/bus.rb:507:in `call'
</line>
−
<line>
/usr/lib/ruby/site_ruby/1.8/dbus/bus.rb:507:in `process'
</line>
−
<line>
/usr/lib/ruby/site_ruby/1.8/dbus/bus.rb:468:in `send_sync'
</line>
−
<line>
/usr/lib/ruby/site_ruby/1.8/dbus/bus.rb:335:in `introspect_data'
</line>
−
<line>
/usr/lib/ruby/site_ruby/1.8/dbus/introspect.rb:444:in `introspect'
</line>
−
<line>
/usr/local/src/rails/rest-service/webservice/../plugins/patches/app/models/resolvable.rb:58:in
`packagekit_connect'
</line>
−
<line>
/usr/local/src/rails/rest-service/webservice/../plugins/patches/app/models/resolvable.rb:139:in
`execute'
</line>
−
<line>
/usr/local/src/rails/rest-service/webservice/../plugins/patches/app/models/patch.rb:15:in
`find'
</line>
−
<line>
/usr/local/src/rails/rest-service/webservice/../plugins/patches/app/controllers/patches_controller.rb:45:in
`index'
--
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.