[packages/calibre] - up to 3.46.0

baggins baggins at pld-linux.org
Wed Jul 24 19:57:55 CEST 2019


commit 394abe0728c4d8a1362d3786f2f7f84d72ec2d3d
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Thu Jul 25 01:57:49 2019 +0800

    - up to 3.46.0

 calibre-locales.patch | 24 ++++++++++++++++--------
 calibre.spec          |  6 +++---
 2 files changed, 19 insertions(+), 11 deletions(-)
---
diff --git a/calibre.spec b/calibre.spec
index ccfe00e..950e798 100644
--- a/calibre.spec
+++ b/calibre.spec
@@ -11,12 +11,12 @@
 Summary:	E-book converter and library management
 Summary(pl.UTF-8):	Konwerter oraz biblioteka dla e-booków
 Name:		calibre
-Version:	3.44.0
-Release:	2
+Version:	3.46.0
+Release:	1
 License:	GPL v3+
 Group:		Applications/Multimedia
 Source0:	%{name}-%{version}-nofonts.tar.xz
-# Source0-md5:	306d559dc5c4bc4c8191ce3004a6137e
+# Source0-md5:	0a0d0a1805f5d7d738b345a847ac3fd0
 Source1:	generate-tarball.sh
 Source2:	%{name}-mount-helper
 Patch0:		%{name}-prefix.patch
diff --git a/calibre-locales.patch b/calibre-locales.patch
index 761389c..01b6084 100644
--- a/calibre-locales.patch
+++ b/calibre-locales.patch
@@ -55,7 +55,7 @@
 -                allow_user_override=False), 'r') as zf:
 -                try:
 -                    buf = io.BytesIO(zf.read(mpath + '/messages.mo'))
--                except:
+-                except Exception:
 -                    pass
 -                else:
 -                    trans = GNUTranslations(buf)
@@ -125,18 +125,26 @@
  
  lcdata = {
      u'abday': (u'Sun', u'Mon', u'Tue', u'Wed', u'Thu', u'Fri', u'Sat'),
-@@ -134,10 +134,11 @@
+@@ -134,20 +134,11 @@
  
  
  def get_single_translator(mpath, which='messages'):
 -    from zipfile import ZipFile
 -    with ZipFile(P('localization/locales.zip', allow_user_override=False), 'r') as zf:
--        buf = io.BytesIO(zf.read(mpath + '/%s.mo' % which))
-+    try:
-+        buf = open(os.path.join(mpath, '/%s.mo' % which), 'rb')
-         return GNUTranslations(buf)
-+    except:
-+        pass  # No translations for this lang
+-        path = '{}/{}.mo'.format(mpath, which)
+-        data = zf.read(path)
+-        buf = io.BytesIO(data)
+         try:
++            buf = open(os.path.join(mpath, '/%s.mo' % which), 'rb')
+             return GNUTranslations(buf)
+         except Exception as e:
+-            import traceback
+-            traceback.print_exc()
+-            import hashlib
+-            sig = hashlib.sha1(data).hexdigest()
+-            raise ValueError('Failed to load translations for: {} (size: {} and signature: {}) with error: {}'.format(
+-                path, len(data), sig, e))
++            pass  # No translations for this lang
  
  
  def get_iso639_translator(lang):
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/calibre.git/commitdiff/394abe0728c4d8a1362d3786f2f7f84d72ec2d3d



More information about the pld-cvs-commit mailing list