Gentoo Archives: gentoo-commits

From: "Andreas K. Hüttel" <dilfridge@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-devel/automake/files/, sys-devel/automake/
Date: Mon, 20 Jan 2020 05:04:57
Message-Id: 1579496665.23577f272c86fe7c44c684b3366f63f8fe1cf04f.dilfridge@gentoo
1 commit: 23577f272c86fe7c44c684b3366f63f8fe1cf04f
2 Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jan 19 04:24:03 2020 +0000
4 Commit: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
5 CommitDate: Mon Jan 20 05:04:25 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=23577f27
7
8 sys-devel/automake: Fix remaining tests broken with py3
9
10 Bug: https://bugs.gentoo.org/705514
11 Package-Manager: Portage-2.3.84, Repoman-2.3.20
12 Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>
13
14 sys-devel/automake/automake-1.16.1-r2.ebuild | 4 +++
15 sys-devel/automake/automake-9999.ebuild | 4 +++
16 .../files/automake-1.16.1-py3-compile-test.patch | 12 +++++++
17 .../automake-1.16.1-py3-pep3147-cmdline.patch | 16 +++++++++
18 .../files/automake-1.16.1-py3-pep3147.patch | 39 ++++++++++++++++++++++
19 5 files changed, 75 insertions(+)
20
21 diff --git a/sys-devel/automake/automake-1.16.1-r2.ebuild b/sys-devel/automake/automake-1.16.1-r2.ebuild
22 index c483767b582..d18df7f0675 100644
23 --- a/sys-devel/automake/automake-1.16.1-r2.ebuild
24 +++ b/sys-devel/automake/automake-1.16.1-r2.ebuild
25 @@ -49,7 +49,11 @@ BDEPEND="
26 PATCHES=(
27 "${FILESDIR}"/automake-1.16.1-py3-compile.patch
28 "${FILESDIR}"/automake-1.16.1-py3-no-pyo-files.patch
29 + "${FILESDIR}"/automake-1.16.1-py3-pep3147.patch
30 + "${FILESDIR}"/automake-1.16.1-py3-pep3147-cmdline.patch
31 + "${FILESDIR}"/automake-1.16.1-py3-compile-test.patch
32 )
33 +# All three patches have been submitted upstream and ignored there.
34
35 pkg_setup() {
36 use test && python-any-r1_pkg_setup
37
38 diff --git a/sys-devel/automake/automake-9999.ebuild b/sys-devel/automake/automake-9999.ebuild
39 index c483767b582..d18df7f0675 100644
40 --- a/sys-devel/automake/automake-9999.ebuild
41 +++ b/sys-devel/automake/automake-9999.ebuild
42 @@ -49,7 +49,11 @@ BDEPEND="
43 PATCHES=(
44 "${FILESDIR}"/automake-1.16.1-py3-compile.patch
45 "${FILESDIR}"/automake-1.16.1-py3-no-pyo-files.patch
46 + "${FILESDIR}"/automake-1.16.1-py3-pep3147.patch
47 + "${FILESDIR}"/automake-1.16.1-py3-pep3147-cmdline.patch
48 + "${FILESDIR}"/automake-1.16.1-py3-compile-test.patch
49 )
50 +# All three patches have been submitted upstream and ignored there.
51
52 pkg_setup() {
53 use test && python-any-r1_pkg_setup
54
55 diff --git a/sys-devel/automake/files/automake-1.16.1-py3-compile-test.patch b/sys-devel/automake/files/automake-1.16.1-py3-compile-test.patch
56 new file mode 100644
57 index 00000000000..bd5a6759c29
58 --- /dev/null
59 +++ b/sys-devel/automake/files/automake-1.16.1-py3-compile-test.patch
60 @@ -0,0 +1,12 @@
61 +diff -ruN automake-1.16.1.orig/t/py-compile-basedir.sh automake-1.16.1/t/py-compile-basedir.sh
62 +--- automake-1.16.1.orig/t/py-compile-basedir.sh 2020-01-20 05:07:12.915260159 +0100
63 ++++ automake-1.16.1/t/py-compile-basedir.sh 2020-01-20 05:07:45.827074984 +0100
64 +@@ -42,7 +42,7 @@
65 + py_installed "$d2/$f.pyc"
66 + py_installed "$d2/sub/$f.pyc"
67 + files=$(find "$d2" | grep '\.py[co]$')
68 +- test $(echo "$files" | wc -l) -eq 4
69 ++ test $(echo "$files" | wc -l) -eq 4 -o $(echo "$files" | wc -l) -eq 6
70 + case $d2 in
71 + .|..) rm -f $files;;
72 + *) rm -rf "$d2";;
73
74 diff --git a/sys-devel/automake/files/automake-1.16.1-py3-pep3147-cmdline.patch b/sys-devel/automake/files/automake-1.16.1-py3-pep3147-cmdline.patch
75 new file mode 100644
76 index 00000000000..7ece18ebc30
77 --- /dev/null
78 +++ b/sys-devel/automake/files/automake-1.16.1-py3-pep3147-cmdline.patch
79 @@ -0,0 +1,16 @@
80 +diff -ruN automake-1.16.1.orig/t/instmany-python.sh automake-1.16.1/t/instmany-python.sh
81 +--- automake-1.16.1.orig/t/instmany-python.sh 2018-02-26 21:38:28.000000000 +0100
82 ++++ automake-1.16.1/t/instmany-python.sh 2020-01-20 02:44:37.192352310 +0100
83 +@@ -21,7 +21,11 @@
84 + required='python'
85 + . test-init.sh
86 +
87 +-limit=2500
88 ++limit=3200
89 ++# Let's increase the number here a bit, otherwise the __pycache__ dirs
90 ++# make the test fail. I know this is a hack, but does anything conform
91 ++# to the POSIX limit of 4096 still anyway?
92 ++
93 + subdir=long_subdir_name_with_many_characters
94 + nfiles=81
95 + list=$(seq_ 1 $nfiles)
96
97 diff --git a/sys-devel/automake/files/automake-1.16.1-py3-pep3147.patch b/sys-devel/automake/files/automake-1.16.1-py3-pep3147.patch
98 new file mode 100644
99 index 00000000000..545544d89fe
100 --- /dev/null
101 +++ b/sys-devel/automake/files/automake-1.16.1-py3-pep3147.patch
102 @@ -0,0 +1,39 @@
103 +From: Lukas Fleischer
104 +Subject: python: Properly uninstall __pycache__ in subdirectories
105 +Date: Sun, 20 May 2018 17:28:51 +0200
106 +
107 +When uninstalling __pycache__ files in a subdirectory "sub", the
108 +Makefile incorrectly removed the files from __pycache__/sub/ instead of
109 +sub/__pycache__/.
110 +
111 +* lib/am/python.am (uninstall-%DIR%PYTHON): Use the correct path when
112 +uninstalling byte-compiled files installed in '__pycache__'
113 +subdirectories.
114 +
115 +Source: https://lists.gnu.org/archive/html/automake-patches/2018-05/msg00000.html
116 +Reviewed-by: Andreas K. Hüttel <dilfridge@g.o>
117 +---
118 + lib/am/python.am | 4 ++--
119 + 1 file changed, 2 insertions(+), 2 deletions(-)
120 +
121 +diff -ruN automake-1.16.1.orig/lib/am/python.am automake-1.16.1/lib/am/python.am
122 +--- automake-1.16.1.orig/lib/am/python.am 2018-02-26 21:38:27.000000000 +0100
123 ++++ automake-1.16.1/lib/am/python.am 2020-01-19 05:35:01.212177206 +0100
124 +@@ -97,7 +97,7 @@
125 + if %?INSTALL%
126 +
127 + ?FIRST?am__pep3147_tweak = \
128 +-?FIRST? sed -e 's|\.py$$||' -e 's|[^/]*$$|&.*.pyc\n&.*.pyo|'
129 ++?FIRST? sed -e 's|\.py$$||' -e 's|[^/]*$$|__pycache__/&.*.pyc\n__pycache__/&.*.pyo|'
130 +
131 + .PHONY uninstall-am: uninstall-%DIR%PYTHON
132 + uninstall-%DIR%PYTHON:
133 +@@ -116,7 +116,7 @@
134 + done; \
135 + ## This is somewhat tricky, because for newer pythons we have to take PEP-3147
136 + ## into account. Avoid exceeding the command-line length limit.
137 +- dir='$(DESTDIR)$(%NDIR%dir)/__pycache__'; \
138 ++ dir='$(DESTDIR)$(%NDIR%dir)'; \
139 + echo "$$py_files" | $(am__pep3147_tweak) | $(am__base_list) | \
140 + while read files; do \
141 + $(am__uninstall_files_from_dir) || st=$$?; \