diff options
author | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2023-01-09 17:46:14 +0100 |
---|---|---|
committer | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2023-02-02 21:53:18 +0000 |
commit | f2a2dab47dfae5c0c0bd68132e1446d571767eb8 (patch) | |
tree | 543ec556dd4e138077907ba8186099fe781974b4 /solenv/bin/modules | |
parent | 2c961e4dc2290bb726d42047205623bcd102f046 (diff) |
capture output of package command and add to log on error
creating packages failed here and the logs aren't all that helpful
without the output of the command that failed.
Reason it failed was that macOS thought that a volume with the same name
was already mounted (but that didn't show up in Finder). With the output
of the command easy to solve by just rebooting to fix that bogus state,
but with only "command failed" you question what is different about that
specific language, why would packaging that single language fail, …
Change-Id: I1f46263f9ec9c9374da5afaa58f6c9939b6a1488
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145239
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Diffstat (limited to 'solenv/bin/modules')
-rw-r--r-- | solenv/bin/modules/installer/simplepackage.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/solenv/bin/modules/installer/simplepackage.pm b/solenv/bin/modules/installer/simplepackage.pm index 230f84da66df..dd29c4c9eb1b 100644 --- a/solenv/bin/modules/installer/simplepackage.pm +++ b/solenv/bin/modules/installer/simplepackage.pm @@ -494,13 +494,14 @@ sub create_package if ( $makesystemcall ) { print "... $systemcall ...\n"; - my $returnvalue = system($systemcall); + my $systemcall_output = `$systemcall`; + my $returnvalue = $? >> 8; my $infoline = "Systemcall: $systemcall\n"; push( @installer::globals::logfileinfo, $infoline); if ($returnvalue) { - $infoline = "ERROR: Could not execute \"$systemcall\": $returnvalue\n"; + $infoline = "ERROR: Could not execute \"$systemcall\" - exitcode: $returnvalue - output:\n$systemcall_output\n"; push( @installer::globals::logfileinfo, $infoline); } else |