diff options
author | Joey Hess <joey@kitenet.net> | 2012-08-27 11:55:45 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-08-27 11:55:45 -0400 |
commit | 731152b39ab2a84e565dd5b2663ad94c4a656c12 (patch) | |
tree | 9eddfe892b2bac20c98fb242d667c5f80a093f03 /Debian | |
parent | 834b79a0fb600230380bc3982ff5c2dc43964c19 (diff) |
python distutils buildsystem: Propigate failure of pyversions. Closes: #683551 Thanks, Clint Byrum
Diffstat (limited to 'Debian')
-rw-r--r-- | Debian/Debhelper/Buildsystem/python_distutils.pm | 16 |
1 files changed, 15 insertions, 1 deletions
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), |