[zeroinstall-injector] Further launcher script clean-up

Michel Alexandre Salim salimma at fedoraproject.org
Sat Jul 2 20:42:36 UTC 2011


commit d9bd7dc958c74bf8665a69e97c20ec2333336a9b
Author: Michel Alexandre Salim <michel.salim at cs.fau.de>
Date:   Sat Jul 2 22:42:06 2011 +0200

    Further launcher script clean-up

 zeroinstall-injector-1.1-rm-space.patch |   57 +++++++++++++++++++++++++++++++
 zeroinstall-injector.spec               |   11 ++++--
 2 files changed, 65 insertions(+), 3 deletions(-)
---
diff --git a/zeroinstall-injector-1.1-rm-space.patch b/zeroinstall-injector-1.1-rm-space.patch
new file mode 100644
index 0000000..e5ad5de
--- /dev/null
+++ b/zeroinstall-injector-1.1-rm-space.patch
@@ -0,0 +1,57 @@
+From 9269f43875d9a58601976626f17cb488dd2f6fb5 Mon Sep 17 00:00:00 2001
+From: Thomas Leonard <talex5 at gmail.com>
+Date: Sat, 2 Jul 2011 10:49:29 +0100
+Subject: [PATCH] Removed extra space from alias scripts
+
+---
+ tests/testalias.py   |    2 +-
+ zeroinstall/alias.py |    6 +++---
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/tests/testalias.py b/tests/testalias.py
+index 0618f9b..a2d4366 100755
+--- a/tests/testalias.py
++++ b/tests/testalias.py
+@@ -9,7 +9,7 @@ sys.path.insert(0, '..')
+ from zeroinstall import alias
+ 
+ expected_script = """#!/bin/sh
+-exec 0launch  'http://example.com/foo.xml' "$@"
++exec 0launch 'http://example.com/foo.xml' "$@"
+ """
+ 
+ old_script = """#!/bin/sh
+diff --git a/zeroinstall/alias.py b/zeroinstall/alias.py
+index a6fb6dd..f46b59c 100644
+--- a/zeroinstall/alias.py
++++ b/zeroinstall/alias.py
+@@ -17,7 +17,7 @@ fi
+ ''' 
+ 
+ _template = '''#!/bin/sh
+-exec 0launch %s '%s' "$@"
++exec 0launch %s'%s' "$@"
+ '''
+ 
+ class NotAnAliasScript(Exception):
+@@ -31,7 +31,7 @@ def parse_script(pathname):
+ 	@raise NotAnAliasScript: if we can't parse the script
+ 	"""
+ 	stream = file(pathname)
+-	template_header = _template[:_template.index("%s '")]
++	template_header = _template[:_template.index("%s'")]
+ 	actual_header = stream.read(len(template_header))
+ 	stream.seek(0)
+ 	if template_header == actual_header:
+@@ -67,7 +67,7 @@ def write_script(stream, interface_uri, main = None):
+ 	assert "\\" not in interface_uri
+ 
+ 	if main is not None:
+-		main_arg = "--main '%s'" % main.replace("'", "'\\''")
++		main_arg = "--main '%s' " % main.replace("'", "'\\''")
+ 	else:
+ 		main_arg = ""
+ 
+-- 
+1.7.5.4
+
diff --git a/zeroinstall-injector.spec b/zeroinstall-injector.spec
index 4dc3df1..fc5b056 100644
--- a/zeroinstall-injector.spec
+++ b/zeroinstall-injector.spec
@@ -5,15 +5,16 @@
 
 Name:    zeroinstall-injector
 Version: 1.1
-Release: 1%{?dist}
+Release: 2%{?dist}
 Summary: The Zero Install Injector (0launch)
 
 Group:   Applications/System
 License: LGPLv2
 URL:     http://0install.net
 Source0: http://downloads.sourceforge.net/project/zero-install/injector/%{version}/%{name}-%{version}.tar.bz2
-# https://sourceforge.net/tracker/?func=detail&aid=3324502&group_id=76468&atid=547191
-Patch0:	 %{name}-1.1-rm-versions.patch
+# From post-1.1 Git master branch
+Patch0:  %{name}-1.1-rm-versions.patch
+Patch1:  %{name}-1.1-rm-space.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildArch: noarch
@@ -58,6 +59,7 @@ automatically check for updates when software is run.
 %setup -q -n %{name}-%{version}
 
 %patch0 -p1 -b .rm-versions
+%patch1 -p1 -b .rm-space
 
 %build
 %{__python} setup.py build
@@ -132,6 +134,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 %attr(755,zeroinst,zeroinst) %{cache_dir}/implementations
 
 %changelog
+* Sat Jul  2 2011 Michel Salim <salimma at fedoraproject.org> - 1.1-2
+- Further launcher script clean-up
+
 * Wed Jun 29 2011 Michel Salim <salimma at fedoraproject.org> - 1.1-1
 - Update to 1.1
 - Remove --versions option, obsoleted in favor of '0alias launcher'


More information about the scm-commits mailing list