Skip to contentSkip to conversation

scancpan patches

PATCH New Christopher McCrory 3 participants 10 messages Aug 20, 2018 – Sep 20, 2018

lore
Share & tools
lore
#0 lore raw

cover scancpan patches

0001-scancpan-wrap-abstract-if-too-long.patch
updated to use 62 columns as requested

0002-scancpan-skip-Dist-Zilla.patch
better check as sugested by Fran?ois

0003-scancpan-support-more-licenses.patch
respun without ambiguous choices

Christopher McCrory (3):
scancpan: wrap abstract if too long
scancpan: skip Dist::Zilla
scancpan: support more licenses

 utils/scancpan | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
Signature · 1 line
2.14.4
#1 lore raw

PATCH 1/3 scancpan: wrap abstract if too long

---
 utils/scancpan | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
utils/scancpan +3 -1
index 8f47521692..6c90588ed4 100755
@@ -484,6 +484,8 @@ use HTTP::Tiny;
 use Safe;
 use MetaCPAN::API::Tiny;
 use Digest::SHA qw(sha256_hex);
+use Text::Wrap;
+$Text::Wrap::columns = 62;
 
 # Below, 5.026 should be aligned with the version of perl actually
 # bundled in Buildroot:
@@ -663,7 +665,7 @@ while (my ($distname, $dist) = each %dist) {
     my $brname = brname( $fsname );
     mkdir $dirname unless -d $dirname;
     if ($need_target{$distname} && ($force || !-f $cfgname)) {
-        my $abstract = $dist->{abstract};
+        my $abstract = wrap("","\t  ",$dist->{abstract});
         my $homepage = $dist->{resources}->{homepage} || qq{https://metacpan.org/release/${distname}};
         say qq{write ${cfgname}} unless $quiet;
         open my $fh, q{>}, $cfgname;
Signature · 1 line
2.14.4
#2 lore raw

PATCH 1/3 scancpan: wrap abstract if too long

2018-08-20 13:16 GMT+02:00 Christopher McCrory <[email protected]>:

Quoted 19 lines
---
 utils/scancpan | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
utils/scancpan +2 -0
index 8f47521692..6c90588ed4 100755
@@ -484,6 +484,8 @@ use HTTP::Tiny;
 use Safe;
 use MetaCPAN::API::Tiny;
 use Digest::SHA qw(sha256_hex);
+use Text::Wrap;
+$Text::Wrap::columns = 62;
 
 # Below, 5.026 should be aligned with the version of perl actually
 # bundled in Buildroot:

utils/scancpan while (my ($distname, $dist) = each %dist) { · line 669

Quoted 6 lines
utils/scancpan +1 -1
@@ -663,7 +665,7 @@ while (my ($distname, $dist) = each %dist) {
     my $brname = brname( $fsname );
     mkdir $dirname unless -d $dirname;
     if ($need_target{$distname} && ($force || !-f $cfgname)) {
-        my $abstract = $dist->{abstract};
+        my $abstract = wrap("","\t  ",$dist->{abstract});
 

please, be consistent with the coding style, like this :

             my $abstract = wrap( q{}, qq{\t  }, $dist->{abstract} );

Fran?ois

         my $homepage = $dist->{resources}->{homepage} || qq{
Quoted 11 lines
utils/scancpan +0 -0
 https://metacpan.org/release/${distname}};
         say qq{write ${cfgname}} unless $quiet;
         open my $fh, q{>}, $cfgname;

--
2.14.4

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20180821/853eb747/attachment.html>

#3 lore raw

PATCH 1/3 scancpan: wrap abstract if too long

In reply to Christopher McCrory

Hello,

Quoted 4 lines · Christopher McCrory
---
 utils/scancpan | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Could you send an updated version that takes into account the comment made by Fran?ois a month ago ?

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#4 lore raw

PATCH 2/3 scancpan: skip Dist::Zilla

In reply to Christopher McCrory
---
 utils/scancpan | 1 +
 1 file changed, 1 insertion(+)
utils/scancpan +1 -0
index 6c90588ed4..c83730fa13 100755
@@ -603,6 +603,7 @@ sub fetch {
             # we could use the host Module::CoreList data, because host perl and
             # target perl have the same major version
             next if ${$dep}{phase} eq q{develop};
+	    next if ${$dep}{phase} eq q{x_Dist_Zilla};
             next if !($test && $top) && ${$dep}{phase} eq q{test};
             my $distname = $mcpan->module( $modname )->{distribution};
             if (${$dep}{phase} eq q{runtime}) {
Signature · 1 line
2.14.4
#5 lore raw

PATCH 2/3 scancpan: skip Dist::Zilla

2018-08-20 13:16 GMT+02:00 Christopher McCrory <[email protected]>:

Quoted 12 lines
---
 utils/scancpan | 1 +
 1 file changed, 1 insertion(+)
utils/scancpan +0 -0
index 6c90588ed4..c83730fa13 100755
@@ -603,6 +603,7 @@ sub fetch {
             # we could use the host Module::CoreList data, because host

perl and

Quoted 4 lines
             # target perl have the same major version
             next if ${$dep}{phase} eq q{develop};
+           next if ${$dep}{phase} eq q{x_Dist_Zilla};

please, indent with only space (no hard tab).

Fran?ois

Quoted 11 lines
             next if !($test && $top) && ${$dep}{phase} eq q{test};
             my $distname = $mcpan->module( $modname )->{distribution};
             if (${$dep}{phase} eq q{runtime}) {

--
2.14.4

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20180821/b8016b9a/attachment.html>

#6 lore raw

PATCH 2/3 scancpan: skip Dist::Zilla

In reply to Christopher McCrory

Hello,

Quoted 10 lines · Christopher McCrory
---
 utils/scancpan | 1 +
 1 file changed, 1 insertion(+)
utils/scancpan +0 -0
index 6c90588ed4..c83730fa13 100755

utils/scancpan sub fetch { · line 606

Quoted 4 lines
utils/scancpan +1 -0
@@ -603,6 +603,7 @@ sub fetch {
             # we could use the host Module::CoreList data, because host perl and
             # target perl have the same major version
             next if ${$dep}{phase} eq q{develop};
+	    next if ${$dep}{phase} eq q{x_Dist_Zilla};

I fixed the indentation issue that Fran?ois reported, and applied.

BTW, it is not really great that a comment made on August 21 is not addressed by a new version of the patches while we are a month later. I was in fact waiting for a new version to apply this change, but since it didn't arrive, I ended up fixing it up before applying.

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#7 lore raw

PATCH 3/3 scancpan: support more licenses

In reply to Christopher McCrory
---
 utils/scancpan | 7 +++++++
 1 file changed, 7 insertions(+)
utils/scancpan +7 -0
index c83730fa13..5db4decc5e 100755
@@ -702,9 +702,16 @@ while (my ($distname, $dist) = each %dist) {
                     ? join q{ or }, @{$dist->{license}}
                     : $dist->{license};
         # BR requires license name as in http://spdx.org/licenses/
+        $license =~ s|apache_1_1|Apache-1.1|;
         $license =~ s|apache_2_0|Apache-2.0|;
+        $license =~ s|artistic|Artistic-1.0|;
         $license =~ s|artistic_2|Artistic-2.0|;
+        $license =~ s|lgpl_2_1|LGPL-2.1|;
+        $license =~ s|lgpl_3_0|LGPL-3.0|;
+        $license =~ s|gpl_2|GPL-2.0|;
+        $license =~ s|gpl_3|GPL-3.0|;
         $license =~ s|mit|MIT|;
+        $license =~ s|mozilla_1_1|Mozilla-1.1|;
         $license =~ s|openssl|OpenSSL|;
         $license =~ s|perl_5|Artistic or GPL-1.0+|;
         my $license_files = join q{ }, keys %{$license_files{$distname}};
Signature · 1 line
2.14.4
#8 lore raw

PATCH 3/3 scancpan: support more licenses

2018-08-20 13:16 GMT+02:00 Christopher McCrory <[email protected]>:

Quoted 2 lines

---

Quoted 27 lines
 utils/scancpan | 7 +++++++
 1 file changed, 7 insertions(+)
utils/scancpan +7 -1
index c83730fa13..5db4decc5e 100755
@@ -702,9 +702,16 @@ while (my ($distname, $dist) = each %dist) {
                     ? join q{ or }, @{$dist->{license}}
                     : $dist->{license};
         # BR requires license name as in http://spdx.org/licenses/
+        $license =~ s|apache_1_1|Apache-1.1|;
         $license =~ s|apache_2_0|Apache-2.0|;
+        $license =~ s|artistic|Artistic-1.0|;
         $license =~ s|artistic_2|Artistic-2.0|;
+        $license =~ s|lgpl_2_1|LGPL-2.1|;
+        $license =~ s|lgpl_3_0|LGPL-3.0|;
+        $license =~ s|gpl_2|GPL-2.0|;
+        $license =~ s|gpl_3|GPL-3.0|;
         $license =~ s|mit|MIT|;
+        $license =~ s|mozilla_1_1|Mozilla-1.1|;
         $license =~ s|openssl|OpenSSL|;
         $license =~ s|perl_5|Artistic or GPL-1.0+|;
         my $license_files = join q{ }, keys %{$license_files{$distname}};
--

2.14.4

Quoted 5 lines

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20180821/b661fc66/attachment.html>