diff --git a/automake.spec b/automake.spec index 517f58f70ab7a36fd50b4ed9116f76374fa099b5..c9eb051291de942aa047c90132abaa495171e0e4 100644 --- a/automake.spec +++ b/automake.spec @@ -4,7 +4,7 @@ Name: automake Version: 1.16.5 -Release: 3 +Release: 4 Summary: A tool for automatically generating Makefile.in files License: GPLv2+ and GFDL and Public Domain and MIT URL: http://www.gnu.org/software/automake/ @@ -14,6 +14,8 @@ Source2: http://git.savannah.gnu.org/cgit/config.git/plain/config.guess BuildArch: noarch +Patch1: backport-tests-fix-py-compile-basedir.sh-missing-test.patch + BuildRequires: perl autoconf make help2man automake perl-generators #for tests BuildRequires: libtool gettext-devel flex bison vala @@ -69,6 +71,9 @@ fi %{_mandir}/man1/* %changelog +* Sat Oct 22 2022 yixiangzhike - 1.16.5-4 +- fix py-compile-basedir.sh missing test + * Tue Jan 11 2021 Sunhaiyong - 1.16.5-3 - Add loongarch support. diff --git a/backport-tests-fix-py-compile-basedir.sh-missing-test.patch b/backport-tests-fix-py-compile-basedir.sh-missing-test.patch new file mode 100644 index 0000000000000000000000000000000000000000..bcd4abe63079ee6bab292bd93df5956740a8d402 --- /dev/null +++ b/backport-tests-fix-py-compile-basedir.sh-missing-test.patch @@ -0,0 +1,32 @@ +From ae8fb00111ba0c4922609cd9beb552fb41b66cc6 Mon Sep 17 00:00:00 2001 +From: Jim Meyering +Date: Tue, 18 Jan 2022 02:00:22 -0800 +Subject: [PATCH] tests: fix py-compile-basedir.sh: missing "test" + +Prompted by a patch from Thomas Deutschmann , +via https://lists.gnu.org/r/automake-patches/2022-01/msg00001.html: +commit v1.16.1-26-gb279a0d46 ("tests: in python tests, do not +require .pyo files (for python3)") was missing a `test` call. +Reported to Gentoo at https://bugs.gentoo.org/715040. +* t/py-compile-basedir.sh: Rather than just adding the missing +"test", rewrite using a case statement, to avoid some duplication. +--- + t/py-compile-basedir.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/t/py-compile-basedir.sh b/t/py-compile-basedir.sh +index 44b6b07c1..22e605f9d 100644 +--- a/t/py-compile-basedir.sh ++++ b/t/py-compile-basedir.sh +@@ -43,7 +43,7 @@ for d in foo foo/bar "$(pwd)/foo" . .. ../foo ''; do + py_installed "$d2/sub/$f.pyc" + files=$(find "$d2" | grep '\.py[co]$') + # with new-enough Python3, there are six files. +- test $(echo "$files" | wc -l) -eq 4 || $(echo "$files" | wc -l) -eq 6 ++ case $(echo "$files" | wc -l) in 4|6) ;; *) false;; esac + case $d2 in + .|..) rm -f $files;; + *) rm -rf "$d2";; +-- +2.27.0 +