ref: refs/heads/network
commit 7cf38299bc19eed7347a0f99a4fa91158f49d24b
Author: Klaus Kämpf
Date: Sat Sep 26 21:55:41 2009 +0200
revert 'run' overlay afterwards
---
plugins/patches/test/packagekit_stub.rb | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/plugins/patches/test/packagekit_stub.rb b/plugins/patches/test/packagekit_stub.rb
index abcdfd7..cb3e503 100644
--- a/plugins/patches/test/packagekit_stub.rb
+++ b/plugins/patches/test/packagekit_stub.rb
@@ -8,6 +8,7 @@
require File.join(File.dirname(__FILE__), "test_helper")
class PackageKitResult
+
attr_reader :info, :id, :summary
def initialize info, id, summary
@@ -113,7 +114,7 @@ class PackageKitStub
# alias 'run' as 'orig_run'
DBus::Main.class_eval { alias :orig_run :run }
-
+
# Now overlay 'run' with our own implementation
# This will fake a sender (via .emit) sending signals
# then we call orig_run to process these signals
@@ -142,7 +143,10 @@ class PackageKitStub
DBus::SystemBus.instance.emit(pks, ti.object, ti, DBus::Signal.new("Finished"))
# now call the original 'run' to process the signals we just emitted
self.orig_run
+ DBus::Main.send(:undef_method, :run)
+ DBus::Main.class_eval { alias :run :orig_run }
end
+
end
end # PackageKitStub
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org