pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/graphics/py-mcomix fix read subprocess stdout line by ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/75574ad7c282
branches:  trunk
changeset: 355470:75574ad7c282
user:      nonaka <nonaka%pkgsrc.org@localhost>
date:      Sat Dec 03 04:08:53 2016 +0000

description:
fix read subprocess stdout line by line.

Bump PKGREVISION.

diffstat:

 graphics/py-mcomix/Makefile                                          |   4 +-
 graphics/py-mcomix/distinfo                                          |   6 +-
 graphics/py-mcomix/patches/patch-mcomix_archive_archive_base.py      |  17 ++++++
 graphics/py-mcomix/patches/patch-mcomix_archive_pdf_external.py      |  26 ++++++++++
 graphics/py-mcomix/patches/patch-mcomix_archive_rar_external.py      |  17 ++++++
 graphics/py-mcomix/patches/patch-mcomix_archive_sevenzip_external.py |  26 ++++++++++
 6 files changed, 93 insertions(+), 3 deletions(-)

diffs (131 lines):

diff -r fedb9bdcc6d0 -r 75574ad7c282 graphics/py-mcomix/Makefile
--- a/graphics/py-mcomix/Makefile       Sat Dec 03 03:42:44 2016 +0000
+++ b/graphics/py-mcomix/Makefile       Sat Dec 03 04:08:53 2016 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.10 2016/09/01 17:33:28 nonaka Exp $
+# $NetBSD: Makefile,v 1.11 2016/12/03 04:08:53 nonaka Exp $
 
 DISTNAME=      mcomix-1.2.1
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME}
-PKGREVISION=   2
+PKGREVISION=   3
 CATEGORIES=    graphics python
 MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=mcomix/}
 EXTRACT_SUFX=  .tar.bz2
diff -r fedb9bdcc6d0 -r 75574ad7c282 graphics/py-mcomix/distinfo
--- a/graphics/py-mcomix/distinfo       Sat Dec 03 03:42:44 2016 +0000
+++ b/graphics/py-mcomix/distinfo       Sat Dec 03 04:08:53 2016 +0000
@@ -1,6 +1,10 @@
-$NetBSD: distinfo,v 1.4 2016/06/11 14:34:17 wiz Exp $
+$NetBSD: distinfo,v 1.5 2016/12/03 04:08:53 nonaka Exp $
 
 SHA1 (mcomix-1.2.1.tar.bz2) = c18b920269dea5c77f97af4c1d72d195c13a4c5f
 RMD160 (mcomix-1.2.1.tar.bz2) = db5d4c4ef695384581a504976d09a7e7a28d244e
 SHA512 (mcomix-1.2.1.tar.bz2) = efa4d57edc3a48d9e711767fb3e233ef9b334ff8ba467999e572e60ed747a4ee4aa420c8aa7788b16d7eb6e0901d454d6a405fcec47a8c74098a49491e915cd0
 Size (mcomix-1.2.1.tar.bz2) = 571128 bytes
+SHA1 (patch-mcomix_archive_archive_base.py) = 1098362d435aa0325b1a6b0fe1c12148fedf176c
+SHA1 (patch-mcomix_archive_pdf_external.py) = 4b758daff2e1bd1312961870b209833277bb4cb6
+SHA1 (patch-mcomix_archive_rar_external.py) = 9a2d5f90ae4d618dd43acd29547e2d47ccb48b8b
+SHA1 (patch-mcomix_archive_sevenzip_external.py) = 2c6366e45a40f34349112e41944ae56a6255f95d
diff -r fedb9bdcc6d0 -r 75574ad7c282 graphics/py-mcomix/patches/patch-mcomix_archive_archive_base.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/py-mcomix/patches/patch-mcomix_archive_archive_base.py   Sat Dec 03 04:08:53 2016 +0000
@@ -0,0 +1,17 @@
+$NetBSD: patch-mcomix_archive_archive_base.py,v 1.1 2016/12/03 04:08:53 nonaka Exp $
+
+fix read subprocess stdout line by line.
+
+See http://stackoverflow.com/questions/2715847/python-read-streaming-input-from-subprocess-communicate/17698359#17698359
+
+--- mcomix/archive/archive_base.py.orig        2016-02-12 18:52:12.000000000 +0000
++++ mcomix/archive/archive_base.py     2016-12-03 03:47:22.878349500 +0000
+@@ -211,7 +211,7 @@ class ExternalExecutableArchive(NonUnico
+                              self._get_list_arguments() +
+                              [self.archive])
+         try:
+-            for line in proc.stdout:
++            for line in iter(proc.stdout.readline, b''):
+                 filename = self._parse_list_output_line(line.rstrip(os.linesep))
+                 if filename is not None:
+                     yield self._unicode_filename(filename)
diff -r fedb9bdcc6d0 -r 75574ad7c282 graphics/py-mcomix/patches/patch-mcomix_archive_pdf_external.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/py-mcomix/patches/patch-mcomix_archive_pdf_external.py   Sat Dec 03 04:08:53 2016 +0000
@@ -0,0 +1,26 @@
+$NetBSD: patch-mcomix_archive_pdf_external.py,v 1.1 2016/12/03 04:08:53 nonaka Exp $
+
+fix read subprocess stdout line by line.
+
+See http://stackoverflow.com/questions/2715847/python-read-streaming-input-from-subprocess-communicate/17698359#17698359
+
+--- mcomix/archive/pdf_external.py.orig        2016-02-12 18:52:12.000000000 +0000
++++ mcomix/archive/pdf_external.py     2016-12-03 03:47:31.069776589 +0000
+@@ -34,7 +34,7 @@ class PdfArchive(archive_base.BaseArchiv
+     def iter_contents(self):
+         proc = process.popen(_mutool_exec + ['show', '--', self.archive, 'pages'])
+         try:
+-            for line in proc.stdout:
++            for line in iter(proc.stdout.readline, b''):
+                 if line.startswith('page '):
+                     yield line.split()[1] + '.png'
+         finally:
+@@ -52,7 +52,7 @@ class PdfArchive(archive_base.BaseArchiv
+         try:
+             max_size = 0
+             max_dpi = PDF_RENDER_DPI_DEF
+-            for line in proc.stdout:
++            for line in iter(proc.stdout.readline, b''):
+                 match = self._fill_image_regex.match(line)
+                 if not match:
+                     continue
diff -r fedb9bdcc6d0 -r 75574ad7c282 graphics/py-mcomix/patches/patch-mcomix_archive_rar_external.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/py-mcomix/patches/patch-mcomix_archive_rar_external.py   Sat Dec 03 04:08:53 2016 +0000
@@ -0,0 +1,17 @@
+$NetBSD: patch-mcomix_archive_rar_external.py,v 1.1 2016/12/03 04:08:53 nonaka Exp $
+
+fix read subprocess stdout line by line.
+
+See http://stackoverflow.com/questions/2715847/python-read-streaming-input-from-subprocess-communicate/17698359#17698359
+
+--- mcomix/archive/rar_external.py.orig        2016-02-12 18:52:12.000000000 +0000
++++ mcomix/archive/rar_external.py     2016-12-03 03:47:38.157303416 +0000
+@@ -100,7 +100,7 @@ class RarArchive(archive_base.ExternalEx
+             self._path = None
+             proc = process.popen(self._get_list_arguments(), stderr=process.STDOUT)
+             try:
+-                for line in proc.stdout:
++                for line in iter(proc.stdout.readline, b''):
+                     filename = self._parse_list_output_line(line.rstrip(os.linesep))
+                     if filename is not None:
+                         yield self._unicode_filename(filename)
diff -r fedb9bdcc6d0 -r 75574ad7c282 graphics/py-mcomix/patches/patch-mcomix_archive_sevenzip_external.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/py-mcomix/patches/patch-mcomix_archive_sevenzip_external.py      Sat Dec 03 04:08:53 2016 +0000
@@ -0,0 +1,26 @@
+$NetBSD: patch-mcomix_archive_sevenzip_external.py,v 1.1 2016/12/03 04:08:53 nonaka Exp $
+
+fix read subprocess stdout line by line.
+
+See http://stackoverflow.com/questions/2715847/python-read-streaming-input-from-subprocess-communicate/17698359#17698359
+
+--- mcomix/archive/sevenzip_external.py.orig   2016-02-12 18:52:12.000000000 +0000
++++ mcomix/archive/sevenzip_external.py        2016-12-03 03:47:59.108184817 +0000
+@@ -112,7 +112,7 @@ class SevenZipArchive(archive_base.Exter
+             self._path = None
+             proc = process.popen(self._get_list_arguments(), stderr=process.STDOUT)
+             try:
+-                for line in proc.stdout:
++                for line in iter(proc.stdout.readline, b''):
+                     filename = self._parse_list_output_line(line.rstrip(os.linesep))
+                     if filename is not None:
+                         yield self._unicode_filename(filename)
+@@ -231,7 +231,7 @@ class TarArchive(SevenZipArchive):
+         self._path = 'archive.tar'
+         proc = process.popen(self._get_list_arguments(), stderr=process.STDOUT)
+         try:
+-            for line in proc.stdout:
++            for line in iter(proc.stdout.readline, b''):
+                 self._parse_list_output_line(line.rstrip(os.linesep))
+         finally:
+             proc.stdout.close()



Home | Main Index | Thread Index | Old Index