From c92612b4b55262dc5c39a7386e725b624f5e1f23 Mon Sep 17 00:00:00 2001 From: Francois Perrad Date: Sun, 20 Aug 2017 10:03:31 +0200 Subject: [PATCH] scancpan: catch exception when MANIFEST is missing Signed-off-by: Francois Perrad Signed-off-by: Thomas Petazzoni --- utils/scancpan | 16 +++++++++++----- 1 file 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 = (); -- 2.30.2