Subject: [bug#35446] [PATCH v2 05/24] gnu: calibre: Patch out unrar test.

From: Brendan Tildesley <[email-masked]>
Date: Sat, 4 May 2019 02:42:13 +1000

* gnu/packages/ebook.scm (calibre):[patches]: Patch out test_unrar.
  gnu/local.mk: Add reference to patch file.
  gnu/packages/patches/calibre-remove-test-unrar.patch: New file.
---
 gnu/local.mk                                  |  1 +
 gnu/packages/ebook.scm                        |  3 ++-
 .../patches/calibre-remove-test-unrar.patch   | 27 +++++++++++++++++++
 3 files changed, 30 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/calibre-remove-test-unrar.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index d7d1a3fed6..d5b7a2c5e5 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -690,6 +690,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/boost-fix-icu-build.patch		\
   %D%/packages/patches/byobu-writable-status.patch		\
   %D%/packages/patches/calibre-no-updates-dialog.patch		\
+  %D%/packages/patches/calibre-remove-test-unrar.patch		\
   %D%/packages/patches/casync-renameat2-declaration.patch	\
   %D%/packages/patches/catdoc-CVE-2017-11110.patch		\
   %D%/packages/patches/cdparanoia-fpic.patch			\
diff --git a/gnu/packages/ebook.scm b/gnu/packages/ebook.scm
index 6bc3813725..f2875ef2fc 100644
--- a/gnu/packages/ebook.scm
+++ b/gnu/packages/ebook.scm
@@ -97,7 +97,8 @@
             (delete-file "src/odf/thumbnail.py")
             (delete-file-recursively "resources/fonts/liberation")
             #t))
-        (patches (search-patches "calibre-no-updates-dialog.patch"))))
+        (patches (search-patches "calibre-no-updates-dialog.patch"
+                                 "calibre-remove-test-unrar.patch"))))
     (build-system python-build-system)
     (native-inputs
      `(("pkg-config" ,pkg-config)
diff --git a/gnu/packages/patches/calibre-remove-test-unrar.patch b/gnu/packages/patches/calibre-remove-test-unrar.patch
new file mode 100644
index 0000000000..fdffb0c750
--- /dev/null
+++ b/gnu/packages/patches/calibre-remove-test-unrar.patch
@@ -0,0 +1,27 @@
+From a16f97b02bd8afd0ec05c471e156f631f2cc6eec Mon Sep 17 00:00:00 2001
+From: Brendan Tildesley <[email-masked]>
+Date: Tue, 26 Mar 2019 22:17:03 +1100
+Subject: [PATCH] Remove test_unrar.
+
+---
+ src/calibre/test_build.py | 4 ----
+ 1 file changed, 4 deletions(-)
+
+diff --git a/src/calibre/test_build.py b/src/calibre/test_build.py
+index d67afd20a6..709132ef17 100644
+--- a/src/calibre/test_build.py
++++ b/src/calibre/test_build.py
+@@ -220,10 +220,6 @@ class BuildTest(unittest.TestCase):
+         from calibre.gui2.win_file_dialogs import test
+         test()
+ 
+-    def test_unrar(self):
+-        from calibre.utils.unrar import test_basic
+-        test_basic()
+-
+     @unittest.skipUnless(iswindows, 'WPD is windows only')
+     def test_wpd(self):
+         wpd = plugins['wpd'][0]
+-- 
+2.21.0
+
-- 
2.21.0