From: Zhang Qiang Date: Fri, 15 Nov 2013 01:44:59 +0000 (+0800) Subject: Save export error info to final report X-Git-Tag: 0.11~15 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=12a4a12a0bf6eb565e49204cc050149af3cb88f7;p=tools%2Fdepanneur.git Save export error info to final report Change-Id: I58b9c0b6d35547ad92357219dfe23661a980e036 --- diff --git a/data/build-report.tmpl b/data/build-report.tmpl index d627a3c..82eaef5 100644 --- a/data/build-report.tmpl +++ b/data/build-report.tmpl @@ -66,7 +66,7 @@ The following packages can't be exported correctly: - + @@ -90,7 +90,7 @@ The following packages have build dependencies issue: - + diff --git a/depanneur b/depanneur index 8ac7100..32631eb 100755 --- a/depanneur +++ b/depanneur @@ -554,11 +554,12 @@ sub read_cache { sub write_cache { my ($cache_key, $cache_val, $base, $spec) = @_; my $cache_fname = "$cache_path/$cache_key"; + my @export_out = gbs_export($base, $spec); - if (gbs_export($base, $spec) != 0) { + if (shift @export_out) { push(@export_errors, {package_name => $cache_key, package_path => $base, - error_info => "N/A"}); # TODO + error_info => \@export_out}); return; } @@ -1552,6 +1553,10 @@ sub build_report scalar(@export_errors) . ") ===\n"; foreach my $pkg (@export_errors) { $msg .= $pkg->{"package_name"} . "\n"; + push @export_details, { package_name => $pkg->{"package_name"}, + package_path => $pkg->{"package_path"}, + error_info => join("
", @{$pkg->{"error_info"}}), + }; } $msg .= "\n"; } @@ -1603,7 +1608,7 @@ sub build_report packages_build_error => $num_build_errors }; - $build_status_json{"export_details"} = \@export_errors; + $build_status_json{"export_details"} = \@export_details; $build_status_json{"expansion_details"} = \@expansion_details; $build_status_json{"build_details"} = \@build_details;