diff options
author | Stephan Bergmann <stephan.bergmann@allotropia.de> | 2024-01-12 14:00:35 +0100 |
---|---|---|
committer | Stephan Bergmann <stephan.bergmann@allotropia.de> | 2024-01-12 17:26:49 +0100 |
commit | a31f334d36b5735ba6fc8d0f89e834a73bdcc561 (patch) | |
tree | 83da65637c7f334193a6e0a807b4db7449af4df5 /external | |
parent | e5f80cc94fc0d8874e47e4425f2c58f0dde9debe (diff) |
Windows MAR update issues with program/{setup,version}.ini
At least on Windows, our MSI install sets differ from our archive install sets
in that their program/setup.ini and program/version.ini files have differing
content: For one, they have ProductCode, UpdateCode, and MsiProductVersion (the
latter only in version.ini) lines that have empty values in archive install sets
and non-empty values in MSI install sets. For another, setup.ini in MSI install
sets has additional ALLUSERS, BASISINSTALLLOCATION, FINDPRODUCT,
INSTALLLOCATION, OFFICEINSTALLLOCATION, and UREINSTALLLOCATION lines that are
completely missing in archive install sets.
This is a problem when building MAR updates with create-partial-info: Both ini
files contain the buildid, so will always change between builds, so will always
be recorded in MAR updates. But when they are recorded as "patch", actually
applying the MAR update file (generated from archive install sets) to an
installation (originating from an MSI install set) will fail, as the size of the
ini file in the installation doesn't match the expected size recorded in the MAR
update file.
I naively but strongly assume that those differences in ini file content are
historic junk by now that have no practical consequences (i.e., I assume that no
code actually makes use of those ini file entries). Which would mean that it
should actually be harmless to replace an installation's (MSI-originating) ini
files with smaller (archive-originating) ones during an update.
So for now I work around that problem by always forcing these two files to be
recorded as a full "add" rather than as a "patch" in the generated MAR update
file.
In parallel, I will look into the history of all those problematic ini file
entries, and will try to verify that they are indeed unused junk, and will try
to clean that up. (So that ultimately there will be no more differences between
MSI and archive versions.)
Change-Id: I9b22bd83889b569598162c37f9bf1a0857177063
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161974
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Diffstat (limited to 'external')
-rw-r--r-- | external/onlineupdate/UnpackedTarball_onlineupdate.mk | 1 | ||||
-rw-r--r-- | external/onlineupdate/inifiles.patch | 11 |
2 files changed, 12 insertions, 0 deletions
diff --git a/external/onlineupdate/UnpackedTarball_onlineupdate.mk b/external/onlineupdate/UnpackedTarball_onlineupdate.mk index 166ede0a6b9b..43c189b84a18 100644 --- a/external/onlineupdate/UnpackedTarball_onlineupdate.mk +++ b/external/onlineupdate/UnpackedTarball_onlineupdate.mk @@ -21,6 +21,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,onlineupdate, \ ifeq ($(OS),WNT) $(eval $(call gb_UnpackedTarball_add_patches,onlineupdate, \ external/onlineupdate/cygpath.patch \ + external/onlineupdate/inifiles.patch \ )) endif diff --git a/external/onlineupdate/inifiles.patch b/external/onlineupdate/inifiles.patch new file mode 100644 index 000000000000..1d285f09af1b --- /dev/null +++ b/external/onlineupdate/inifiles.patch @@ -0,0 +1,11 @@ +--- tools/update-packaging/make_incremental_update.sh ++++ tools/update-packaging/make_incremental_update.sh +@@ -226,7 +227,7 @@ + patchsize=$(get_file_size "$patchfile") + fullsize=$(get_file_size "$workdir/$f") + +- if [ $patchsize -lt $fullsize ]; then ++ if [ $patchsize -lt $fullsize ] && [ "$f" != program/setup.ini ] && [ "$f" != program/version.ini ]; then + make_patch_instruction "$f" "$updatemanifestv3" + mv -f "$patchfile" "$workdir/$f.patch" + rm -f "$workdir/$f" |