app-admin/rsyslog: fix Py3 failure in diag.sh
authorThomas Deutschmann <whissi@gentoo.org>
Sat, 6 Apr 2019 00:15:26 +0000 (02:15 +0200)
committerThomas Deutschmann <whissi@gentoo.org>
Sat, 6 Apr 2019 00:15:41 +0000 (02:15 +0200)
Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
app-admin/rsyslog/files/rsyslog-8.1903.0-add-py3-support-to-omhttp-test.patch [moved from app-admin/rsyslog/files/rsyslog-8.1903.0-add-py3-support-to-omhttp-test.patch.patch with 100% similarity]
app-admin/rsyslog/files/rsyslog-8.1903.0-fix-py3-compatibility-in-diag.sh.patch [new file with mode: 0644]
app-admin/rsyslog/rsyslog-8.1903.0.ebuild

diff --git a/app-admin/rsyslog/files/rsyslog-8.1903.0-fix-py3-compatibility-in-diag.sh.patch b/app-admin/rsyslog/files/rsyslog-8.1903.0-fix-py3-compatibility-in-diag.sh.patch
new file mode 100644 (file)
index 0000000..615bb50
--- /dev/null
@@ -0,0 +1,22 @@
+From f0847e46c148233b6ab5d6088ca4e1dc664e82a4 Mon Sep 17 00:00:00 2001
+From: Thomas Deutschmann <whissi@whissi.de>
+Date: Sat, 6 Apr 2019 02:07:51 +0200
+Subject: [PATCH] testbench: fix Python 3 compatibility
+
+---
+ tests/diag.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/diag.sh b/tests/diag.sh
+index 5b4b3df46..2926e6ac2 100755
+--- a/tests/diag.sh
++++ b/tests/diag.sh
+@@ -1334,7 +1334,7 @@ get_inode() {
+               printf 'FAIL: file "%s" does not exist in get_inode\n' "$1"
+               error_exit 100
+       fi
+-      python -c 'import os; import stat; print os.lstat("'$1'")[stat.ST_INO]'
++      python -c 'import os; import stat; print(os.lstat("'$1'")[stat.ST_INO])'
+ }
index d1896aca4726aa3570e23fe92e1cc28491a4c841..dcc28922f7b519c6f0143a681dd9cce17e26a3f6 100644 (file)
@@ -102,7 +102,8 @@ fi
 
 PATCHES=(
        "${FILESDIR}"/${P}-add-missing-tests.patch
-       "${FILESDIR}"/${P}-add-py3-support-to-omhttp-test.patch.patch
+       "${FILESDIR}"/${P}-add-py3-support-to-omhttp-test.patch
+       "${FILESDIR}"/${P}-fix-py3-compatibility-in-diag.sh.patch
 )
 
 CONFIG_CHECK="~INOTIFY_USER"