summaryrefslogtreecommitdiff
path: root/Debian/Debhelper/Buildsystem/python_distutils.pm
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2012-08-27 11:55:45 -0400
committerJoey Hess <joey@kitenet.net>2012-08-27 11:55:45 -0400
commit731152b39ab2a84e565dd5b2663ad94c4a656c12 (patch)
tree9eddfe892b2bac20c98fb242d667c5f80a093f03 /Debian/Debhelper/Buildsystem/python_distutils.pm
parent834b79a0fb600230380bc3982ff5c2dc43964c19 (diff)
python distutils buildsystem: Propigate failure of pyversions. Closes: #683551 Thanks, Clint Byrum
Diffstat (limited to 'Debian/Debhelper/Buildsystem/python_distutils.pm')
-rw-r--r--Debian/Debhelper/Buildsystem/python_distutils.pm16
1 files changed, 15 insertions, 1 deletions
diff --git a/Debian/Debhelper/Buildsystem/python_distutils.pm b/Debian/Debhelper/Buildsystem/python_distutils.pm
index ad473a3..4795b7c 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),