ref: refs/heads/master
commit 7a1efa948cbea62d31f063c1ab83a8a0f76f4b58
Author: Klaus Kämpf
Date: Fri Sep 25 18:30:15 2009 +0200
Add comment on implementation complexity
---
plugins/patches/test/packagekit_stub.rb | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/plugins/patches/test/packagekit_stub.rb b/plugins/patches/test/packagekit_stub.rb
index 014d361..abcdfd7 100644
--- a/plugins/patches/test/packagekit_stub.rb
+++ b/plugins/patches/test/packagekit_stub.rb
@@ -118,6 +118,16 @@ class PackageKitStub
# This will fake a sender (via .emit) sending signals
# then we call orig_run to process these signals
#
+ # Remark: This might look overly complex but emitting the signals
+ # at PackageKitResult creation does not work. It seems as if the
+ # buffer (socket?) is flushed so the previously emitted signals are
+ # not received when calling 'run'.
+ #
+ # So this implementation presents the only working solution: Emitting
+ # the signals from inside a faked 'run' and the processing them by
+ # calling 'orig_run'.
+ #
+
# pass a closure(!) to 'run'
DBus::Main.send(:define_method, :run) do
sig = DBus::Signal.new(signal)
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org