Mailinglist Archive: yast-commit (2114 mails)

< Previous Next >
[yast-commit] <rest-service> master : Add comment on implementation complexity
  • From: Klaus Kämpf <kkaempf@xxxxxxx>
  • Date: Fri, 25 Sep 2009 18:30:15 +0200
  • Message-id: <E1MrZcT-0005bf-An@xxxxxxxxxxxxxxxx>
ref: refs/heads/master
commit 7a1efa948cbea62d31f063c1ab83a8a0f76f4b58
Author: Klaus Kämpf <kkaempf@xxxxxxx>
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@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages