From 731152b39ab2a84e565dd5b2663ad94c4a656c12 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 27 Aug 2012 11:55:45 -0400 Subject: python distutils buildsystem: Propigate failure of pyversions. Closes: #683551 Thanks, Clint Byrum --- Debian/Debhelper/Buildsystem/python_distutils.pm | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'Debian/Debhelper') diff --git a/Debian/Debhelper/Buildsystem/python_distutils.pm b/Debian/Debhelper/Buildsystem/python_distutils.pm index ad473a39..4795b7c3 100644 --- a/Debian/Debhelper/Buildsystem/python_distutils.pm +++ b/Debian/Debhelper/Buildsystem/python_distutils.pm @@ -118,9 +118,23 @@ sub setup_py { # extensions for each. my $python_default = `pyversions -d`; + if ($? == -1) { + error("failed to run pyversions") + } + my $ecode = $? >> 8; + if ($ecode != 0) { + error("pyversions -d failed [$ecode]") + } $python_default =~ s/^\s+//; $python_default =~ s/\s+$//; - my @python_requested = split ' ', `pyversions -r 2>/dev/null`; + my @python_requested = split ' ', `pyversions -r`; + if ($? == -1) { + error("failed to run pyversions") + } + $ecode = $? >> 8; + if ($ecode != 0) { + error("pyversions -r failed [$ecode]") + } if (grep /^\Q$python_default\E/, @python_requested) { @python_requested = ( grep(!/^\Q$python_default\E/, @python_requested), -- cgit v1.2.3