[Libreoffice-commits] core.git: postprocess/signing
Christian Lohmaier
lohmaier+LibreOffice at googlemail.com
Sun Sep 8 09:10:19 PDT 2013
postprocess/signing/signing.pl | 21 ++++++++++-----------
1 file changed, 10 insertions(+), 11 deletions(-)
New commits:
commit 6f83e4389912967432260ead0db132f373a880bd
Author: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
Date: Sat Sep 7 19:20:30 2013 +0200
break the habit of throwing away the actually useful error messages
The lines that help dignose a problem is almost never the first one that
just states "there was an error". The explanation of the error follows
in the next lines. So don't quit immediately after the first error-line,
but wait what the command has to tell and log/print the whole info.
Change-Id: I2a4b3470b4b66ed37fa5e5a34d452c548d24b965
Reviewed-on: https://gerrit.libreoffice.org/5861
Reviewed-by: Thomas Arnhold <thomas at arnhold.org>
Reviewed-by: Thorsten Behrens <tbehrens at suse.com>
Tested-by: Thorsten Behrens <tbehrens at suse.com>
diff --git a/postprocess/signing/signing.pl b/postprocess/signing/signing.pl
index 686e56a..fc17092 100644
--- a/postprocess/signing/signing.pl
+++ b/postprocess/signing/signing.pl
@@ -208,17 +208,16 @@ sub execute #11.07.2007 10:02
{
my $commandline = shift;
my $result = "";
-
- print "$commandline\n" if ($debug);
- open(PIPE, "$commandline 2>&1 |") || die "Error: Cant open pipe!\n";
- while ( $result = <PIPE> ) {
- print LOG "$result" if ($opt_log); # logging
- if ( $result =~ /SignTool Error\:/ ) {
- close PIPE;
- print_error( "$result\n" );
- } # if error
- } # while
- close PIPE;
+ my $errorlines = "";
+
+ print "$commandline\n" if ($debug);
+ open(PIPE, "$commandline 2>&1 |") || die "Error: Cannot execute '$commandline' - $!\n";
+ while ( $result = <PIPE> ) {
+ print LOG "$result" if ($opt_log);
+ $errorlines .= $result if ($result =~ /SignTool Error\:/);
+ } # while
+ close PIPE;
+ print_error( "$errorlines\n" ) if ($errorlines);
} ##execute
############################################################################
More information about the Libreoffice-commits
mailing list