From c23ee7db9fcc251cef82e57d4213b1e8d5ba833f Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Wed, 29 Dec 2010 16:33:14 -0500 Subject: [PATCH] work around test_subprocess failure seen in koji (patch 129) --- ...t-subprocess-with-nonreadable-path-dir.patch | 12 ++++++++++++ python3.spec | 17 ++++++++++++++++- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 python-3.2b2-fix-test-subprocess-with-nonreadable-path-dir.patch diff --git a/python-3.2b2-fix-test-subprocess-with-nonreadable-path-dir.patch b/python-3.2b2-fix-test-subprocess-with-nonreadable-path-dir.patch new file mode 100644 index 0000000..f73d57a --- /dev/null +++ b/python-3.2b2-fix-test-subprocess-with-nonreadable-path-dir.patch @@ -0,0 +1,12 @@ +diff -up Python-3.2b2/Lib/test/test_subprocess.py.non-readable-path Python-3.2b2/Lib/test/test_subprocess.py +--- Python-3.2b2/Lib/test/test_subprocess.py.non-readable-path 2010-12-29 16:25:38.498184175 -0500 ++++ Python-3.2b2/Lib/test/test_subprocess.py 2010-12-29 16:25:51.094184539 -0500 +@@ -578,7 +578,7 @@ class ProcessTestCase(BaseTestCase): + for i in range(1024): + # Windows raises IOError. Others raise OSError. + with self.assertRaises(EnvironmentError) as c: +- subprocess.Popen(['nonexisting_i_hope'], ++ subprocess.Popen(['/usr/bin/nonexisting_i_hope'], + stdout=subprocess.PIPE, + stderr=subprocess.PIPE) + if c.exception.errno != errno.ENOENT: # ignore "no such file" diff --git a/python3.spec b/python3.spec index 985bdb2..a67339c 100644 --- a/python3.spec +++ b/python3.spec @@ -106,7 +106,7 @@ Summary: Version 3 of the Python programming language aka Python 3000 Name: python3 Version: %{pybasever} -Release: 0.5.%{alphatag}%{?dist} +Release: 0.6.%{alphatag}%{?dist} License: Python Group: Development/Languages Source: http://python.org/ftp/python/%{version}/Python-%{version}%{alphatag}.tar.bz2 @@ -213,6 +213,17 @@ Patch127: python-3.2b2-fix-test-gc-COUNT_ALLOCS.patch # Not yet sent upstream Patch128: python-3.2b2-test_sys-COUNT_ALLOCS.patch +# In my koji builds, /root/bin is in the PATH for some reason +# This leads to test_subprocess.py failing, due to "test_leaking_fds_on_error" +# trying every dir in PATH for "nonexisting_i_hope", which leads to it raising +# OSError: [Errno 13] Permission denied +# when it tries to read /root/bin, rather than raising "No such file" +# +# Work around this by specifying an absolute path for the non-existant +# executable +# Not yet sent upstream +Patch129: python-3.2b2-fix-test-subprocess-with-nonreadable-path-dir.patch + # This is the generated patch to "configure"; see the description of # %{regenerate_autotooling_patch} # above: @@ -376,6 +387,7 @@ rm -r Modules/zlib || exit 1 %patch126 -p1 %patch127 -p1 %patch128 -p1 +%patch129 -p1 # Currently (2010-01-15), http://docs.python.org/library is for 2.6, and there # are many differences between 2.6 and the Python 3 library. @@ -1141,6 +1153,9 @@ rm -fr %{buildroot} %changelog +* Wed Dec 29 2010 David Malcolm - 3.2-0.6.b2 +- work around test_subprocess failure seen in koji (patch 129) + * Tue Dec 28 2010 David Malcolm - 3.2-0.5.b2 - 3.2b2 - rework patch 3 (removal of mimeaudio tests), patch 6 (no static libs),