external/onlineupdate/lo.patch |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

New commits:
commit ada4296497bae971c3cb293f934f5e6240f23185
Author:     Stephan Bergmann <stephan.bergm...@allotropia.de>
AuthorDate: Fri May 31 10:35:06 2024 +0200
Commit:     Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
CommitDate: Mon Jun 3 20:16:34 2024 +0200

    tdf#161292: Fix create-partial-info for newly added files
    
    084c64982ef6187292fd73e6deaa4448e0b6f3de "Create MAR updates from msi rather
    than from archive" had patched make_add_instruction (in
    workdir/UnpackedTarball/onlineupdate/tools/update-packagin/common.sh) to
    unconditionally use add-if (with the file itself as test file) rather than 
plain
    add (because we can't reuse Mozilla's extension logic there to determine
    optional installation parts), and it noted in its commit message that 
"addition
    of files will cause a MAR update to miss them".
    
    Which turned out to be a problem with
    
<https://update-mar.libreoffice.org/24.2.2.2/LibreOffice_24.2.2.2_Windows_X86_64_d56cc158d8a96260b836f100ef4b4ef25d6f1a01_from_bf759d854b5ab45b6ef0bfd22e51c6dc4fb8b882_partial.mar>,
    updating from 24.2.2.1 with instdir/program/python-core-3.8.18/ to 24.2.2.2 
with
    instdir/program/python-core-3.8.19/:  All the files in python-core-3.8.19 
were
    recorded as add-if testing on themselves, so were never added.
    
    So a better approach is, for newly added files to make them add (so they get
    added unconditionally, even if they are part of some optional component that
    happens to not be installed; this hopefully won't cause further issues) 
instead
    of add-if.  (Existing files that are added instead of patched still use 
add-if,
    though.)  This does not address the create-update-info target for full mar
    updates (which is not used currently?), just the create-partial-info target.
    
    (The existing calls to make_add_instruction in the upstream Mozilla code 
already
    have a seemingly rotten mix of two-argument calls and calls with three 
arguments
    where the third argument is ignored, and would check for a fourth "forced"
    argument but which is never passed in.  So avoid extending that mess 
further,
    and just replace this never-use-add-if call to make_add_instruction directly
    with that function's (accordingly tweaked) body.)
    
    Change-Id: Ib596f3aa72c3ab9f896b20f7d623bc574eb15fd8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168285
    Reviewed-by: Stephan Bergmann <stephan.bergm...@allotropia.de>
    Tested-by: Jenkins
    (cherry picked from commit c00014019e6d33bfb4729c563062db1645c48e9d)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168310
    Reviewed-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
    (cherry picked from commit f7bd624cf1f2ad51a5f7d0edf23a1f19a9063823)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168319
    Tested-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com>

diff --git a/external/onlineupdate/lo.patch b/external/onlineupdate/lo.patch
index 35dfb2f80fb8..571cea560d3c 100644
--- a/external/onlineupdate/lo.patch
+++ b/external/onlineupdate/lo.patch
@@ -372,7 +372,13 @@
        fi
      fi
    else
-@@ -270,7 +270,7 @@
+@@ -266,11 +266,12 @@
+   if check_for_add_if_not_update "$f"; then
+     make_add_if_not_instruction "$f" "$updatemanifestv3"
+   else
+-    make_add_instruction "$f" "$updatemanifestv3"
++    verbose_notice "     add \"$f\""
++    echo "add \"$f\"" >> "$updatemanifestv3"
    fi
  
  

Reply via email to