aboutsummaryrefslogtreecommitdiff
path: root/utils/scancpan
diff options
context:
space:
mode:
authorGravatar Francois Perrad <fperrad@gmail.com>2017-08-20 10:03:31 +0200
committerGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2017-08-21 23:41:07 +0200
commitc92612b4b55262dc5c39a7386e725b624f5e1f23 (patch)
tree6a23b9f4bdd58a9da1b5a195387e2f02212875d2 /utils/scancpan
parent2ded88b9cdbb615117ff3a1d3b592c70367e8762 (diff)
downloadbuildroot-c92612b4b55262dc5c39a7386e725b624f5e1f23.tar.gz
buildroot-c92612b4b55262dc5c39a7386e725b624f5e1f23.tar.bz2
scancpan: catch exception when MANIFEST is missing
Signed-off-by: Francois Perrad <francois.perrad@gadz.org> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'utils/scancpan')
-rwxr-xr-xutils/scancpan16
1 files changed, 11 insertions, 5 deletions
diff --git a/utils/scancpan b/utils/scancpan
index 9ccbac5a41..20bd4c6933 100755
--- a/utils/scancpan
+++ b/utils/scancpan
@@ -567,11 +567,17 @@ sub fetch {
say qq{fetch ${name}} unless $quiet;
my $result = $mcpan->release( distribution => $name );
$dist{$name} = $result;
- my $manifest = $mcpan->source( author => $result->{author},
- release => $name . q{-} . $result->{version},
- path => 'MANIFEST' );
- $need_dlopen{$name} = is_xs( $manifest );
- $license_files{$name} = find_license_files( $manifest );
+ eval {
+ my $manifest = $mcpan->source( author => $result->{author},
+ release => $name . q{-} . $result->{version},
+ path => 'MANIFEST' );
+ $need_dlopen{$name} = is_xs( $manifest );
+ $license_files{$name} = find_license_files( $manifest );
+ };
+ if ($@) {
+ warn $@;
+ $license_files{$name} = [];
+ }
my %build = ();
my %runtime = ();
my %optional = ();