public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Andreas K. Hüttel" <dilfridge@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-devel/automake/files/, sys-devel/automake/
Date: Mon, 20 Jan 2020 05:04:52 +0000 (UTC)	[thread overview]
Message-ID: <1579496665.23577f272c86fe7c44c684b3366f63f8fe1cf04f.dilfridge@gentoo> (raw)

commit:     23577f272c86fe7c44c684b3366f63f8fe1cf04f
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 19 04:24:03 2020 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Mon Jan 20 05:04:25 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=23577f27

sys-devel/automake: Fix remaining tests broken with py3

Bug: https://bugs.gentoo.org/705514
Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 sys-devel/automake/automake-1.16.1-r2.ebuild       |  4 +++
 sys-devel/automake/automake-9999.ebuild            |  4 +++
 .../files/automake-1.16.1-py3-compile-test.patch   | 12 +++++++
 .../automake-1.16.1-py3-pep3147-cmdline.patch      | 16 +++++++++
 .../files/automake-1.16.1-py3-pep3147.patch        | 39 ++++++++++++++++++++++
 5 files changed, 75 insertions(+)

diff --git a/sys-devel/automake/automake-1.16.1-r2.ebuild b/sys-devel/automake/automake-1.16.1-r2.ebuild
index c483767b582..d18df7f0675 100644
--- a/sys-devel/automake/automake-1.16.1-r2.ebuild
+++ b/sys-devel/automake/automake-1.16.1-r2.ebuild
@@ -49,7 +49,11 @@ BDEPEND="
 PATCHES=(
 	"${FILESDIR}"/automake-1.16.1-py3-compile.patch
 	"${FILESDIR}"/automake-1.16.1-py3-no-pyo-files.patch
+	"${FILESDIR}"/automake-1.16.1-py3-pep3147.patch
+	"${FILESDIR}"/automake-1.16.1-py3-pep3147-cmdline.patch
+	"${FILESDIR}"/automake-1.16.1-py3-compile-test.patch
 )
+# All three patches have been submitted upstream and ignored there.
 
 pkg_setup() {
 	use test && python-any-r1_pkg_setup

diff --git a/sys-devel/automake/automake-9999.ebuild b/sys-devel/automake/automake-9999.ebuild
index c483767b582..d18df7f0675 100644
--- a/sys-devel/automake/automake-9999.ebuild
+++ b/sys-devel/automake/automake-9999.ebuild
@@ -49,7 +49,11 @@ BDEPEND="
 PATCHES=(
 	"${FILESDIR}"/automake-1.16.1-py3-compile.patch
 	"${FILESDIR}"/automake-1.16.1-py3-no-pyo-files.patch
+	"${FILESDIR}"/automake-1.16.1-py3-pep3147.patch
+	"${FILESDIR}"/automake-1.16.1-py3-pep3147-cmdline.patch
+	"${FILESDIR}"/automake-1.16.1-py3-compile-test.patch
 )
+# All three patches have been submitted upstream and ignored there.
 
 pkg_setup() {
 	use test && python-any-r1_pkg_setup

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
new file mode 100644
index 00000000000..bd5a6759c29
--- /dev/null
+++ b/sys-devel/automake/files/automake-1.16.1-py3-compile-test.patch
@@ -0,0 +1,12 @@
+diff -ruN automake-1.16.1.orig/t/py-compile-basedir.sh automake-1.16.1/t/py-compile-basedir.sh
+--- automake-1.16.1.orig/t/py-compile-basedir.sh	2020-01-20 05:07:12.915260159 +0100
++++ automake-1.16.1/t/py-compile-basedir.sh	2020-01-20 05:07:45.827074984 +0100
+@@ -42,7 +42,7 @@
+   py_installed "$d2/$f.pyc"
+   py_installed "$d2/sub/$f.pyc"
+   files=$(find "$d2" | grep '\.py[co]$')
+-  test $(echo "$files" | wc -l) -eq 4
++  test $(echo "$files" | wc -l) -eq 4 -o $(echo "$files" | wc -l) -eq 6
+   case $d2 in
+     .|..) rm -f $files;;
+        *) rm -rf "$d2";;

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
new file mode 100644
index 00000000000..7ece18ebc30
--- /dev/null
+++ b/sys-devel/automake/files/automake-1.16.1-py3-pep3147-cmdline.patch
@@ -0,0 +1,16 @@
+diff -ruN automake-1.16.1.orig/t/instmany-python.sh automake-1.16.1/t/instmany-python.sh
+--- automake-1.16.1.orig/t/instmany-python.sh	2018-02-26 21:38:28.000000000 +0100
++++ automake-1.16.1/t/instmany-python.sh	2020-01-20 02:44:37.192352310 +0100
+@@ -21,7 +21,11 @@
+ required='python'
+ . test-init.sh
+ 
+-limit=2500
++limit=3200
++# Let's increase the number here a bit, otherwise the __pycache__ dirs
++# make the test fail. I know this is a hack, but does anything conform
++# to the POSIX limit of 4096 still anyway?
++
+ subdir=long_subdir_name_with_many_characters
+ nfiles=81
+ list=$(seq_ 1 $nfiles)

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
new file mode 100644
index 00000000000..545544d89fe
--- /dev/null
+++ b/sys-devel/automake/files/automake-1.16.1-py3-pep3147.patch
@@ -0,0 +1,39 @@
+From: Lukas Fleischer
+Subject: python: Properly uninstall __pycache__ in subdirectories
+Date: Sun, 20 May 2018 17:28:51 +0200
+
+When uninstalling __pycache__ files in a subdirectory "sub", the
+Makefile incorrectly removed the files from __pycache__/sub/ instead of
+sub/__pycache__/.
+
+* lib/am/python.am (uninstall-%DIR%PYTHON): Use the correct path when
+uninstalling byte-compiled files installed in '__pycache__'
+subdirectories.
+
+Source: https://lists.gnu.org/archive/html/automake-patches/2018-05/msg00000.html
+Reviewed-by: Andreas K. Hüttel <dilfridge@gentoo.org>
+---
+ lib/am/python.am | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff -ruN automake-1.16.1.orig/lib/am/python.am automake-1.16.1/lib/am/python.am
+--- automake-1.16.1.orig/lib/am/python.am	2018-02-26 21:38:27.000000000 +0100
++++ automake-1.16.1/lib/am/python.am	2020-01-19 05:35:01.212177206 +0100
+@@ -97,7 +97,7 @@
+ if %?INSTALL%
+ 
+ ?FIRST?am__pep3147_tweak = \
+-?FIRST?  sed -e 's|\.py$$||' -e 's|[^/]*$$|&.*.pyc\n&.*.pyo|'
++?FIRST?  sed -e 's|\.py$$||' -e 's|[^/]*$$|__pycache__/&.*.pyc\n__pycache__/&.*.pyo|'
+ 
+ .PHONY uninstall-am: uninstall-%DIR%PYTHON
+ uninstall-%DIR%PYTHON:
+@@ -116,7 +116,7 @@
+ 	done; \
+ ## This is somewhat tricky, because for newer pythons we have to take PEP-3147
+ ## into account.  Avoid exceeding the command-line length limit.
+-	dir='$(DESTDIR)$(%NDIR%dir)/__pycache__'; \
++	dir='$(DESTDIR)$(%NDIR%dir)'; \
+ 	echo "$$py_files" | $(am__pep3147_tweak) | $(am__base_list) | \
+ 	  while read files; do \
+ 	    $(am__uninstall_files_from_dir) || st=$$?; \


             reply	other threads:[~2020-01-20  5:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-20  5:04 Andreas K. Hüttel [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-12-07 18:06 [gentoo-commits] repo/gentoo:master commit in: sys-devel/automake/files/, sys-devel/automake/ Mike Frysinger
2023-12-07 18:06 Mike Frysinger
2023-10-17 13:01 David Seifert
2023-10-17  9:16 David Seifert
2020-03-22 13:03 Lars Wendler
2019-11-08  9:47 Lars Wendler
2018-02-26 22:40 Thomas Deutschmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1579496665.23577f272c86fe7c44c684b3366f63f8fe1cf04f.dilfridge@gentoo \
    --to=dilfridge@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox