solenv/bin/modules/installer/windows/mergemodule.pm | 33 ++++++++++---------- 1 file changed, 18 insertions(+), 15 deletions(-)
New commits: commit 7fa9691dc204cef02b14141697f1a68330dcdf30 Author: Christian Lohmaier <lohmaier+libreoff...@googlemail.com> AuthorDate: Wed Feb 12 21:07:24 2025 +0100 Commit: Christian Lohmaier <lohmaier+libreoff...@googlemail.com> CommitDate: Wed Feb 12 22:58:40 2025 +0100 tdf#165149 fix installing Visual Studio C++ runtime dlls/merge modules regression from 1cabb20fad8303d16e25957ee245970f37ad2f82 previously the code had the foreach loop only for the cygwin case, but it was added in a way that looked more like a leftover/temporary addition to add more fine-grained logging that was left in the code on accident rather than intentionally (indents weren't adjusted for example) in a commit that talked about adding support for filesystems without short names (fac37861914f255c55a196a154575a0d7e143ac8) and the code before that one also passed all the tables at once – but it turns out that there actually is a functional difference. Description for msidb's -i option reads: "Import text archive files from folder into database. Table names for import are file names 8 characters long with an ".idt" extension. Longer names are truncated to 8 characters if supplied by command for import. Standard wild card specifications may be used." Maybe that truncation mechansism doesn't work as expected when specifying more than one table… Instead of messing around with that however: Play it safe and use the method that was used for the last 14 years Change-Id: If1bdc1f01f4ccdee13277267f5407046cba4ca03 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181511 Reviewed-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com> Tested-by: Jenkins diff --git a/solenv/bin/modules/installer/windows/mergemodule.pm b/solenv/bin/modules/installer/windows/mergemodule.pm index 2fc8a98c0211..7f5055b70217 100644 --- a/solenv/bin/modules/installer/windows/mergemodule.pm +++ b/solenv/bin/modules/installer/windows/mergemodule.pm @@ -535,23 +535,26 @@ sub merge_mergemodules_into_msi_database installer::logger::include_timestamp_into_logfile(" Performance Info: Before including tables"); - $systemcall = $msidb . " -d " . $msifilename . " -f " . $workdir . " -i " . $workingtables. " " . $executetables; - # msidb.exe really wants backslashes - $systemcall =~ s/\//\\/g; + # trying to import all tables at once seems to work fine, but creates a broken installer tdf#165149 + foreach my $table (split / /, $workingtables . ' ' . $executetables) { + $systemcall = $msidb . " -d " . $msifilename . " -f " . $workdir . " -i " . $table; + # msidb.exe really wants backslashes + $systemcall =~ s/\//\\/g; - $systemcall_output = `$systemcall`; - $returnvalue = $? >> 8; + $systemcall_output = `$systemcall`; + $returnvalue = $? >> 8; - if ($returnvalue) - { - $infoline = "ERROR: Could not execute $systemcall - returncode: $returnvalue - output: $systemcall_output "; - push( @installer::globals::logfileinfo, $infoline); - installer::exiter::exit_program("ERROR: Could not include tables into msi database: $msifilename !", "merge_mergemodules_into_msi_database"); - } - else - { - $infoline = "Success: Executed $systemcall successfully! "; - push( @installer::globals::logfileinfo, $infoline); + if ($returnvalue) + { + $infoline = "ERROR: Could not execute $systemcall - returncode: $returnvalue - output: $systemcall_output "; + push( @installer::globals::logfileinfo, $infoline); + installer::exiter::exit_program("ERROR: Could not include tables into msi database: $msifilename !", "merge_mergemodules_into_msi_database"); + } + else + { + $infoline = "Success: Executed $systemcall successfully! "; + push( @installer::globals::logfileinfo, $infoline); + } } installer::logger::include_timestamp_into_logfile(" Performance Info: After including tables");