aboutsummaryrefslogtreecommitdiff
path: root/support
diff options
context:
space:
mode:
authorGravatar Francois Perrad <fperrad@gmail.com>2016-06-16 18:26:24 +0200
committerGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2016-07-04 17:41:54 +0200
commit28a001fc7b1df037b8528a55aabc92d23dc2c8ea (patch)
tree7daa4bc9ec9071e2a4d913fb1c2a40516a0cabdc /support
parentd125e8d4d3929cbfa2a7b3dd10514cf1bac87816 (diff)
downloadbuildroot-28a001fc7b1df037b8528a55aabc92d23dc2c8ea.tar.gz
buildroot-28a001fc7b1df037b8528a55aabc92d23dc2c8ea.tar.bz2
scancpan: improve message when bad host perl version
Signed-off-by: Francois Perrad <francois.perrad@gadz.org> [Thomas: - add comment in scancpan about the version dependency, suggested by Yann E. Morin. - add comment in perl.mk about the need to sync any version change with scancpan, also suggested by Yann E. Morin.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'support')
-rwxr-xr-xsupport/scripts/scancpan19
1 files changed, 14 insertions, 5 deletions
diff --git a/support/scripts/scancpan b/support/scripts/scancpan
index 6c70cfba8a..3ee543a31f 100755
--- a/support/scripts/scancpan
+++ b/support/scripts/scancpan
@@ -471,7 +471,7 @@ unshift @INC, sub {
} # END OF FATPACK CODE
-use 5.022; # same major version as target perl
+use 5.010;
use strict;
use warnings;
use Fatal qw(open close);
@@ -484,6 +484,19 @@ use HTTP::Tiny;
use Safe;
use MetaCPAN::API::Tiny;
+# Below, 5.022 should be aligned with the version of perl actually
+# bundled in Buildroot:
+die <<"MSG" if $] < 5.022;
+This script needs a host perl with the same major version as Buildroot target perl.
+
+Your current host perl is:
+ $^X
+ version $]
+
+You may install a local one by running:
+ perlbrew install perl-5.22.2
+MSG
+
my ($help, $man, $quiet, $force, $recommend, $test, $host);
my $target = 1;
GetOptions( 'help|?' => \$help,
@@ -746,10 +759,6 @@ support/scripts/scancpan Try-Tiny Moo
=head1 SYNOPSIS
-curl -kL http://install.perlbrew.pl | bash
-
-perlbrew install perl-5.18.2
-
supports/scripts/scancpan [options] [distname ...]
Options: