rpms/uniconvertor/devel UniConvertor-1.1.3-cover_by_func.patch, NONE, 1.1 uniconvertor.spec, 1.14, 1.15

Andy Shevchenko andriy at fedoraproject.org
Wed Feb 11 17:41:31 UTC 2009


Author: andriy

Update of /cvs/extras/rpms/uniconvertor/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv7892

Modified Files:
	uniconvertor.spec 
Added Files:
	UniConvertor-1.1.3-cover_by_func.patch 
Log Message:
Fix #484301

UniConvertor-1.1.3-cover_by_func.patch:

--- NEW FILE UniConvertor-1.1.3-cover_by_func.patch ---
diff -up UniConvertor-1.1.3/src/__init__.py.orig UniConvertor-1.1.3/src/__init__.py
--- UniConvertor-1.1.3/src/__init__.py.orig	2009-02-11 18:56:57.000000000 +0200
+++ UniConvertor-1.1.3/src/__init__.py	2009-02-11 19:01:24.000000000 +0200
@@ -41,43 +41,44 @@ Example: uniconvertor drawing.cdr drawin
 
 import sys, os, string
 
-_pkgdir = __path__[0]
-app_dir = os.path.join(_pkgdir, 'app')
-app_ver = string.strip(open(os.path.join(app_dir, 'VERSION')).read())
-
-if len(sys.argv)<2 or sys.argv[1]=='--help':
-	print '\nUniConvertor',app_ver
-	print __doc__
+def uniconv():
+	_pkgdir = __path__[0]
+	app_dir = os.path.join(_pkgdir, 'app')
+	app_ver = string.strip(open(os.path.join(app_dir, 'VERSION')).read())
+	
+	if len(sys.argv) < 2 or sys.argv[1] == '--help':
+		print '\nUniConvertor', app_ver
+		print __doc__
+		sys.exit(0)
+	if not os.path.isfile(sys.argv[1]):
+		print '\nERROR: %s file is not found!' % sys.argv[1]
+		print '\nUniConvertor',app_ver
+		print __doc__
+		sys.exit(1)
+	if len(sys.argv) != 3:
+		print '\nERROR: incorrect arguments!'
+		print '\nUniConvertor', app_ver
+		print __doc__
+		sys.exit(1)
+	
+	
+	sys.path.insert(1, _pkgdir)
+	
+	from app.io import load
+	from app.plugins import plugins
+	import app
+	
+	app.init_lib()
+	
+	doc = load.load_drawing(sys.argv[1])
+	extension = os.path.splitext(sys.argv[2])[1]
+	plugins.load_plugin_configuration()
+	fileformat = plugins.guess_export_plugin(extension)
+	if fileformat:
+		saver = plugins.find_export_plugin(fileformat)
+		saver(doc, sys.argv[2])
+	else:
+		sys.stderr.write('ERROR: unrecognized extension %s\n' % extension)
+		sys.exit(1)
+	doc.Destroy()
 	sys.exit(0)
-if not os.path.isfile(sys.argv[1]):
-	print '\nERROR: %s file is not found!' % sys.argv[1]
-	print '\nUniConvertor',app_ver
-	print __doc__
-	sys.exit(1)
-if len(sys.argv) != 3:
-	print '\nERROR: incorrect arguments!'
-	print '\nUniConvertor',app_ver
-	print __doc__
-	sys.exit(1)
-
-
-sys.path.insert(1, _pkgdir)
-
-from app.io import load
-from app.plugins import plugins
-import app
-
-app.init_lib()
-
-doc = load.load_drawing(sys.argv[1])
-extension = os.path.splitext(sys.argv[2])[1]
-plugins.load_plugin_configuration()
-fileformat = plugins.guess_export_plugin(extension)
-if fileformat:
-	saver = plugins.find_export_plugin(fileformat)
-	saver(doc, sys.argv[2])
-else:
-	sys.stderr.write('ERROR: unrecognized extension %s\n' % extension)
-	sys.exit(1)
-doc.Destroy()
-sys.exit(0)
--- UniConvertor-1.1.3/src/uniconv.orig	2009-02-11 19:21:28.000000000 +0200
+++ UniConvertor-1.1.3/src/uniconv	2009-02-11 19:23:51.000000000 +0200
@@ -20,4 +20,4 @@
 #
 
 
-exec python -c "import uniconvertor" "$1" "$2"
+exec python -c "from uniconvertor import uniconv; uniconv();" "$1" "$2"


Index: uniconvertor.spec
===================================================================
RCS file: /cvs/extras/rpms/uniconvertor/devel/uniconvertor.spec,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- uniconvertor.spec	29 Nov 2008 17:21:25 -0000	1.14
+++ uniconvertor.spec	11 Feb 2009 17:41:01 -0000	1.15
@@ -2,7 +2,7 @@
 
 Name:           uniconvertor
 Version:        1.1.3
-Release:        3%{?dist}
+Release:        4%{?dist}
 Summary:        Universal vector graphics translator
 
 Group:          Applications/Multimedia
@@ -11,8 +11,11 @@
 Source0:        http://sk1project.org/downloads/uniconvertor/v%{version}/%{name}-%{version}.tar.gz
 # Upstream notified via forum: http://sk1project.org/forum/topic.php?forum=2&topic=19
 Patch0:         UniConvertor-1.1.0-simplify.patch
+# Upstream notified via forum: http://sk1project.org/forum/topic.php?forum=2&topic=11
 Patch1:         UniConvertor-1.1.1-rename-in-help.patch
 Patch2:         UniConvertor-1.1.1-use-exec.patch
+# Upstream notified via forum: http://sk1project.org/forum/topic.php?forum=2&topic=62
+Patch3:         UniConvertor-1.1.3-cover_by_func.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  python-devel
@@ -30,6 +33,7 @@
 %patch0 -p1 -b .simplify
 %patch1 -p1 -b .rename-in-help
 %patch2 -p1 -b .use-exec
+%patch3 -p1 -b .cover_by_func
 
 # Prepare for inclusion into documentation part
 install -p -m644 src/COPYRIGHTS COPYRIGHTS
@@ -76,6 +80,9 @@
 
 
 %changelog
+* Wed Feb 11 2009 Andy Shevchenko <andy at smile.org.ua> - 1.1.3-4
+- cover code in __init__.py by function (#484301)
+
 * Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm at gmail.com> - 1.1.3-3
 - Rebuild for Python 2.6
 




More information about the scm-commits mailing list