diff options
author | jkhsjdhjs | 2022-11-28 21:50:33 +0100 |
---|---|---|
committer | jkhsjdhjs | 2022-11-28 22:07:19 +0100 |
commit | ad9dec8089565f68940804216373efa986504efc (patch) | |
tree | fb498078de34ee3ecc856e43e7baf9cad411895e | |
parent | 437bd6fa83d180203d4a58307831a083352fe587 (diff) | |
download | aur-ad9dec8089565f68940804216373efa986504efc.tar.gz |
Patch wrapper so it doesn't drop every second line of stdout
-rw-r--r-- | .SRCINFO | 2 | ||||
-rw-r--r-- | PKGBUILD | 11 | ||||
-rw-r--r-- | wrapper-Fix-dropping-every-second-line-of-stdout-807.patch | 27 |
3 files changed, 38 insertions, 2 deletions
@@ -13,9 +13,11 @@ pkgbase = nzbhydra2 source = nzbhydra2.service source = nzbhydra2.tmpfiles source = nzbhydra2.sysusers + source = wrapper-Fix-dropping-every-second-line-of-stdout-807.patch sha256sums = 52e488c71fbadf007cbdfc041c150ab44ac9054513c5b90c9b8dc42e804fb53c sha256sums = 0ae34e5c7e65779dcca28a16d61f5ddd0dbf1e706143353fcb8c643b8421da70 sha256sums = 4003b4561db3867d194a731dbe495d2d1b5e0a1de3595b5d2e5502049ed6762e sha256sums = 8f91eb4f98f7f5c11590b29b1394dfa7ca62ad115feeac4f402c9ac094fb925a + sha256sums = d59bb189f178170c523550a032af7bc5f4c90518b3bca8a631403d6725bd6528 pkgname = nzbhydra2 @@ -14,12 +14,19 @@ optdepends=('jackett: torrent indexer proxy') source=("https://github.com/theotherp/nzbhydra2/releases/download/v${pkgver}/${pkgname}-${pkgver}-linux.zip" 'nzbhydra2.service' 'nzbhydra2.tmpfiles' - 'nzbhydra2.sysusers') + 'nzbhydra2.sysusers' + 'wrapper-Fix-dropping-every-second-line-of-stdout-807.patch') sha256sums=('52e488c71fbadf007cbdfc041c150ab44ac9054513c5b90c9b8dc42e804fb53c' '0ae34e5c7e65779dcca28a16d61f5ddd0dbf1e706143353fcb8c643b8421da70' '4003b4561db3867d194a731dbe495d2d1b5e0a1de3595b5d2e5502049ed6762e' - '8f91eb4f98f7f5c11590b29b1394dfa7ca62ad115feeac4f402c9ac094fb925a') + '8f91eb4f98f7f5c11590b29b1394dfa7ca62ad115feeac4f402c9ac094fb925a' + 'd59bb189f178170c523550a032af7bc5f4c90518b3bca8a631403d6725bd6528') + +prepare() { + # TODO: remove on next release + patch "${srcdir}/nzbhydra2wrapperPy3.py" < "${srcdir}/wrapper-Fix-dropping-every-second-line-of-stdout-807.patch" +} package() { install -d -m 755 "${pkgdir}/usr/lib/nzbhydra2" diff --git a/wrapper-Fix-dropping-every-second-line-of-stdout-807.patch b/wrapper-Fix-dropping-every-second-line-of-stdout-807.patch new file mode 100644 index 000000000000..c86ec96cf59b --- /dev/null +++ b/wrapper-Fix-dropping-every-second-line-of-stdout-807.patch @@ -0,0 +1,27 @@ +From 5f1e047a406a2b2ce32af89b0a44a401c30160ac Mon Sep 17 00:00:00 2001 +From: jkhsjdhjs <jkhsjdhjs@users.noreply.github.com> +Date: Tue, 1 Nov 2022 21:45:13 +0100 +Subject: [PATCH] wrapper: Fix dropping every second line of stdout (#807) + +Since readline() was called twice on stdout, every second +line of nzbhydra's output was previously dropped. +--- + other/wrapper/nzbhydra2wrapperPy3.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/other/wrapper/nzbhydra2wrapperPy3.py b/other/wrapper/nzbhydra2wrapperPy3.py +index c44f3f77..1c691007 100644 +--- a/other/wrapper/nzbhydra2wrapperPy3.py ++++ b/other/wrapper/nzbhydra2wrapperPy3.py +@@ -424,7 +424,7 @@ def startup(): + while True: + # Handle error first in case startup of main process returned only an error (on stderror) + nextline = process.stdout.readline() +- nextlineString = process.stdout.readline().decode("utf-8") ++ nextlineString = nextline.decode("utf-8") + if nextlineString == '' and process.poll() is not None: + break + if nextlineString != "": +-- +2.38.1 + |