[packages/emesene] - avoid loading and packaging dummy provider, as if papyon library fails to load you will be prese

draenog draenog at pld-linux.org
Thu Jul 5 19:52:10 CEST 2012


commit 152c25dffcaba9570d0b3d2e86a578e8fd844388
Author: Elan Ruusamäe <glen at pld-linux.org>
Date:   Thu Jul 5 17:30:59 2012 +0000

    - avoid loading and packaging dummy provider, as if papyon library fails to
      load you will be presented with such colorful contact list:
      https://dl.dropbox.com/u/8879577/ss/msn-emesene.png which scares hell out of
      you thinking how did you msn id got leaked
    
    Changed files:
        emesene.spec -> 1.29
        no-dummy.patch -> 1.1

 emesene.spec   |  9 +++++----
 no-dummy.patch | 36 ++++++++++++++++++++++++++++++++++++
 2 files changed, 41 insertions(+), 4 deletions(-)
---
diff --git a/emesene.spec b/emesene.spec
index 07501d1..5009f10 100644
--- a/emesene.spec
+++ b/emesene.spec
@@ -3,7 +3,7 @@
 Summary:	Instant messaging client for Windows Live Messenger (tm) network
 Name:		emesene
 Version:	2.12.5
-Release:	0.3
+Release:	0.6
 License:	GPL v3 (emesene), GPL v2 (themes), LGPL (the rest)
 Group:		Applications/Networking
 URL:		http://www.emesene.org/
@@ -13,6 +13,7 @@ Patch0:		%{name}-desktop.patch
 Patch2:		plugins-pyc.patch
 Patch3:		pythonpath.patch
 Patch4:		locale-path.patch
+Patch5:		no-dummy.patch
 BuildRequires:	gettext
 BuildRequires:	python-devel
 BuildRequires:	python-modules
@@ -81,6 +82,7 @@ mv *-emesene-*/* .
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
+%patch5 -p1
 
 # remove shebang
 %{__sed} -i -e '/^#!\//, 1d' emesene/test/e3_example.py emesene/extension.py \
@@ -90,8 +92,8 @@ mv *-emesene-*/* .
 # using system pkg
 #%{__rm} -r emesene/e3/papylib/papyon
 
-# skip debug provider
-%{__sed} -i -e '/import e3dummy/d' emesene/emesene.py
+# skip test provider
+%{__rm} -r emesene/e3/dummy
 
 # cleanup backups after patching
 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
@@ -168,7 +170,6 @@ rm -rf $RPM_BUILD_ROOT
 %{_datadir}/%{name}/e3/base
 %{_datadir}/%{name}/e3/cache
 %{_datadir}/%{name}/e3/common
-%{_datadir}/%{name}/e3/dummy
 %{_datadir}/%{name}/e3/synch
 
 %dir %{_datadir}/%{name}/e3/xmpp
diff --git a/no-dummy.patch b/no-dummy.patch
new file mode 100644
index 0000000..6003136
--- /dev/null
+++ b/no-dummy.patch
@@ -0,0 +1,36 @@
+--- emesene-2.12.5/emesene/emesene.py~	2012-07-05 20:22:24.000000000 +0300
++++ emesene-2.12.5/emesene/emesene.py	2012-07-05 20:26:32.796531143 +0300
+@@ -80,7 +80,6 @@
+ log = logging.getLogger('emesene')
+ 
+ import e3
+-from e3 import dummy
+ 
+ try:
+     from e3.common.DBus import DBusController
+@@ -169,17 +168,12 @@
+ 
+     def _setup(self):
+         '''register core extensions'''
+-        extension.category_register('session', dummy.Session,
+-                single_instance=True)
+         if xmpp is not None:
+             extension.register('session', xmpp.Session)
+-        extension.register('session', dummy.Session)
+ 
+         if papylib is not None:
+             extension.register('session', papylib.Session)
+             extension.set_default('session', papylib.Session)
+-        else:
+-            extension.set_default('session', dummy.Session)
+ 
+         #DBus extension stuffs
+         if DBusController is not None:
+@@ -755,7 +749,6 @@
+     """
+     the main method of emesene
+     """
+-    extension.category_register('session', dummy.Session, single_instance=True)
+     extension.category_register('option provider', None,
+             interfaces=interfaces.IOptionProvider)
+     extension.register('quit', sys.exit)


More information about the test mailing list