scancpan: improve message when bad host perl version
PATCH v3 1/1 scancpan: improve message when bad host perl version
--- support/scripts/scancpan | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-)
support/scripts/scancpan +12 -5
@@ -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,17 @@ use HTTP::Tiny; use Safe; use MetaCPAN::API::Tiny; +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 +757,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:
Signature · 1 line
1.9.1
PATCH v3 1/1 scancpan: improve message when bad host perl version
Fran?ois, All,
Thank you for this proposal! :-)
On 2016-06-16 18:26 +0200, Francois Perrad spake thusly:
Quoted 10 lines
Signed-off-by Francois Perrad <[email protected]>--- support/scripts/scancpan | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-)support/scripts/scancpan +0
-0
support/scripts/scancpan unshift @INC, sub { · line 474
Quoted 5 lines
support/scripts/scancpan +1
-1@@ -471,7 +471,7 @@ unshift @INC, sub { } # END OF FATPACK CODE -use 5.022; # same major version as target perl +use 5.010;
So, we now require perl >= 5.10 to run this script, right? (well, to at least get the error message sanely!)
How old is this?
Can we be sure that viurtually everyone has a perl >= 5.010?
Can't we just drop the requirement?
Care to expand the commit log to explain this, please?
support/scripts/scancpan use HTTP::Tiny; · line 486
Quoted 7 lines
support/scripts/scancpan +0
-0use strict; use warnings; use Fatal qw(open close);@@ -484,6 +484,17 @@ use HTTP::Tiny; use Safe; use MetaCPAN::API::Tiny;
Maybe add a comment here:
# PERL_VERSION #
# Below, 5.022 should be aligned with the version of
# perl actually bundled in Buildroot:
support/scripts/scancpan use HTTP::Tiny; · line 496
Quoted 10 lines
support/scripts/scancpan +10
-0+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
Maybe you should also add a comment in package/perl/perl.mk, just above the version string:
# When updating the version here, also update # support/scripts/scancpan (search for "PERL_VERSION") PERL_VERSION_MAJOR = 22
PERL_VERSION = 5.$(PERL_VERSION_MAJOR).2
This will make it more difficult to get out of sync between the two. ;-)
Regards,
Yann E. MORIN.
Quoted 21 lines
support/scripts/scancpan +0
-4my ($help, $man, $quiet, $force, $recommend, $test, $host); my $target = 1; GetOptions( 'help|?' => \$help,@@ -746,10 +757,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:Signature · 6 lines
1.9.1 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH v3 1/1 scancpan: improve message when bad host perl version
2016-06-16 22:08 GMT+02:00 Yann E. MORIN <[email protected]>:
Quoted 18 lines
Fran?ois, All,
Thank you for this proposal! :-)
On 2016-06-16 18:26 +0200, Francois Perrad spake thusly:
Quoted 13 lines
Signed-off-by Francois Perrad <[email protected]>--- support/scripts/scancpan | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-)support/scripts/scancpan +0
-0@@ -471,7 +471,7 @@ unshift @INC, sub { } # END OF FATPACK CODE
Quoted 7 lines
support/scripts/scancpan unshift @INC, sub { · line 474
Quoted 2 lines
support/scripts/scancpan +1
-1-use 5.022; # same major version as target perl +use 5.010;So, we now require perl >= 5.10 to run this script, right? (well, to at least get the error message sanely!)
How old is this?
The release date of Perl 5.10.0 is the 2007-Dec-18.
(see http://perl5.git.perl.org/perl.git/blob/HEAD:/pod/perlhist.pod
or https://fperrad.github.io/graph-versions/perl5.png)
Fran?ois
Quoted 76 lines
Can we be sure that viurtually everyone has a perl >= 5.010?
Can't we just drop the requirement?
Care to expand the commit log to explain this, please?
support/scripts/scancpan use HTTP::Tiny; · line 486
Quoted 7 lines
support/scripts/scancpan +0
-0use strict; use warnings; use Fatal qw(open close);@@ -484,6 +484,17 @@ use HTTP::Tiny; use Safe; use MetaCPAN::API::Tiny;Maybe add a comment here:
#
PERL_VERSION#
# Below, 5.022 should be aligned with the version of# perl actually bundled in Buildroot:support/scripts/scancpan use HTTP::Tiny; · line 496
Quoted 10 lines
support/scripts/scancpan +10
-0+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 +MSGMaybe you should also add a comment in
package/perl/perl.mk, just above the version string:# When updating the version here, also update # support/scripts/scancpan (search for "
PERL_VERSION")PERL_VERSION_MAJOR= 22
PERL_VERSION= 5.$(PERL_VERSION_MAJOR).2This will make it more difficult to get out of sync between the two. ;-)
Regards,
Yann E. MORIN.Quoted 17 lines
support/scripts/scancpan +0
-5my ($help, $man, $quiet, $force, $recommend, $test, $host); my $target = 1; GetOptions( 'help|?' => \$help,@@ -746,10 +757,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: --1.9.1
Quoted 4 lines
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot--
.-----------------.--------------------.------------------.--------------------.| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
PATCH v3 1/1 scancpan: improve message when bad host perl version
In reply to Francois PerradHello,
Quoted 4 lines · Francois Perrad
Signed-off-by Francois Perrad <[email protected]>--- support/scripts/scancpan | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-)
I've taken into account the comments from Yann, and applied.
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com