[jbrout] Eliminate non-sensical (at least for Fedora users) pyexiv2 warning.
Matej Cepl
mcepl at fedoraproject.org
Mon Jul 11 11:25:28 UTC 2011
commit 30beed3c08c301137110067d07791a78d9859c33
Author: Matěj Cepl <mcepl at redhat.com>
Date: Mon Jul 11 13:24:11 2011 +0200
Eliminate non-sensical (at least for Fedora users) pyexiv2 warning.
jbrout-no-pyexiv2-warning.patch | 30 ++++++++++++++++++++++++++++++
jbrout.spec | 6 ++++++
2 files changed, 36 insertions(+), 0 deletions(-)
---
diff --git a/jbrout-no-pyexiv2-warning.patch b/jbrout-no-pyexiv2-warning.patch
new file mode 100644
index 0000000..0d740d1
--- /dev/null
+++ b/jbrout-no-pyexiv2-warning.patch
@@ -0,0 +1,30 @@
+Index: jbrout/jbrout/jbrout.py
+===================================================================
+--- jbrout.orig/jbrout/jbrout.py
++++ jbrout/jbrout/jbrout.py
+@@ -3117,9 +3117,6 @@ if __name__ == "__main__":
+ psyco.full()
+ except:
+ print "The psyco module does not seem to be installed. It is not necessary, however it can speed up performance."
+- # Print pyexiv2-0.2+ warning if necessary
+- from jbrout.pyexiv import Check
+- Check()
+
+ try:
+ parser = optparse.OptionParser(usage=USAGE, version=("JBrout "+__version__))
+Index: jbrout/jbrout/jbrout/pyexiv.py
+===================================================================
+--- jbrout.orig/jbrout/jbrout/pyexiv.py
++++ jbrout/jbrout/jbrout/pyexiv.py
+@@ -269,11 +269,6 @@ def Image(f):
+ # pyexiv2 < 0.2
+ return Exiv1Metadata(f)
+
+-def Check():
+- if hasattr(pyexiv2,"ImageMetadata"):
+- # pyexiv2 >= 0.2
+- print "***WARNING*** : YOU ARE USING pyexiv2>0.2 (jbrout doesn't support very well this new version ! not fully tested ! some things are not implemented !!!)"
+-
+ if __name__ == "__main__":
+ t=Image("/home/manatlan/Documents/python/tests_libs_python/TestJPG/p20030830_130202 (copie).jpg")
+ #~ t=Image("/home/manatlan/Documents/python/tests_libs_python/TestJPG/p20030830_130202.jpg")
diff --git a/jbrout.spec b/jbrout.spec
index ae940d5..a484d93 100644
--- a/jbrout.spec
+++ b/jbrout.spec
@@ -26,6 +26,10 @@ Source4: jbrout-install.sh
Source5: jbrout-clean-SVN-checkout.sh
# EXPERIMENTAL for now, don't distribute!
Patch0: jbrout-purge-no-attribute-attrib.patch
+# No pyexiv2 warning at all (reverse upstream r331)
+# Fedora users have no choice about what pyexiv2 to use.
+# Besides pyexiv2 0.3.* is now officially stable.
+Patch1: jbrout-no-pyexiv2-warning.patch
BuildArch: noarch
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
Requires: python >= 2.4, python-lxml, pygtk2 >= 2.6
@@ -57,6 +61,7 @@ jBrout is able to :
%prep
%setup -q -n %{name}
%patch0 -p1 -b .noAttributeAttrib
+%patch1 -p1 -b .noPyexiv2Warn
sh %{SOURCE5}
install -p %{SOURCE1} jbrout/Makefile
install -p -m a+rx,u+w %{SOURCE4} jbrout/install-script
@@ -96,6 +101,7 @@ rm -rf $RPM_BUILD_ROOT
%changelog
* Sun Jul 10 2011 Matěj Cepl <mcepl at redhat.com> - 0.3.338-0.svn338.1
- New upstream snapshot (GPL version fixed and one more issue resolved)
+- Eliminate again non-sensical pyexiv2 warning.
* Wed Jul 06 2011 Matěj Cepl <mcepl at redhat.com> - 0.3.336-0.svn336.1
- All our patches were applied upstream, new SVN checkout
More information about the scm-commits
mailing list