[gphotoframe/f17] Fix yet another case on exif information with zero denominator

Mamoru Tasaka mtasaka at fedoraproject.org
Tue Dec 11 05:07:25 UTC 2012


commit 2bde7e06cb3c7475cfdc64b3456ad2c27c6bb0a7
Author: TASAKA Mamoru <mtasaka at localhost.localdomain>
Date:   Tue Dec 11 14:07:18 2012 +0900

    Fix yet another case on exif information with zero denominator
    
      (bug 885377)

 gphotoframe-1.5.1-parseexif-fraction-zerodiv.patch |   14 ++++++++++++++
 gphotoframe.spec                                   |   12 +++++++++++-
 2 files changed, 25 insertions(+), 1 deletions(-)
---
diff --git a/gphotoframe-1.5.1-parseexif-fraction-zerodiv.patch b/gphotoframe-1.5.1-parseexif-fraction-zerodiv.patch
new file mode 100644
index 0000000..00a920a
--- /dev/null
+++ b/gphotoframe-1.5.1-parseexif-fraction-zerodiv.patch
@@ -0,0 +1,14 @@
+--- gphotoframe-1.5.1/lib/plugins/base/parseexif.py.zeroden2	2012-12-10 16:09:43.172332099 +0900
++++ gphotoframe-1.5.1/lib/plugins/base/parseexif.py	2012-12-10 17:29:10.830968144 +0900
+@@ -28,7 +28,10 @@
+                 value = str(value)
+ 
+                 if key == 'fstop' or key == 'focallength':
+-                    value = self._convert_from_fraction(value)
++                    try:
++                        value = self._convert_from_fraction(value)
++                    except ZeroDivisionError:
++                        continue   
+                 elif key == 'exposurebias' and value == '0':
+                     continue
+                 elif key == 'flash' and ('Off' in value or 'No' in value):
diff --git a/gphotoframe.spec b/gphotoframe.spec
index 98e4b63..10b6b45 100644
--- a/gphotoframe.spec
+++ b/gphotoframe.spec
@@ -11,7 +11,7 @@
 %global	mainver	1.5.1
 #%%undefine	minorver	
 
-%global	mainrel	2
+%global	mainrel	3
 
 %global	rpmminorver	%(echo "%minorver" | sed -e 's|^-||' | sed -e 's|\\\.||')
 %global	fedorarel	%{?minorver:0.}%{mainrel}%{?minorver:.%rpmminorver}
@@ -29,7 +29,11 @@ URL:		http://code.google.com/p/gphotoframe/
 Source0:	http://gphotoframe.googlecode.com/files/%{name}-%{mainver}%{?minorver}.tar.gz
 
 # Handle exif file with zero denominator on geometry information
+# bug 845418
 Patch2:	gphotoframe-2.0a2-parseexif-geom-zerovalue.patch
+# Fix yet another case on exif information with zero denominator
+# bug 885377
+Patch3:	gphotoframe-1.5.1-parseexif-fraction-zerodiv.patch
 
 BuildRequires:	GConf2
 BuildRequires:	desktop-file-utils
@@ -82,6 +86,7 @@ for gnome-screensaver compatibility.
 %setup -q -n %{name}-%{mainver}%{?minorver}
 
 %patch2 -p2 -b .zeroden
+%patch3 -p1 -b .zeroden2
 
 # Remove unneeded shebangs
 grep -rl '^#![ \t]*%{_bindir}' lib/ | \
@@ -210,8 +215,13 @@ exit 0
 %{_datadir}/applications/screensavers/%{name}-screensaver.desktop
 
 %changelog
+* Mon Dec 10 2012 Mamoru TASAKA <mtasaka at fedoraproject.org> - 1.5.1-3
+- Fix yet another case on exif information with zero denominator
+  (bug 885377)
+
 * Mon Aug 19 2012 Mamoru Tasaka <mtasaka at fedoraproject.org> - 1.5.1-2
 - Handle exif file with zero denominator on geometry information
+  (bug 845418)
 
 * Mon Mar  5 2012 Mamoru Tasaka <mtasaka at fedoraproject.org> - 1.5.1-1
 - 1.5.1


More information about the scm-commits mailing list