solenv/bin/modules/installer/simplepackage.pm |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit f2a2dab47dfae5c0c0bd68132e1446d571767eb8
Author:     Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
AuthorDate: Mon Jan 9 17:46:14 2023 +0100
Commit:     Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
CommitDate: Thu Feb 2 21:53:18 2023 +0000

    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+libreoff...@googlemail.com>

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

Reply via email to