19 Commits
Author SHA1 Message Date
Christian Lohmaier 55b13db9f1 create-mar: flush stdout to see the message when using 2>&1 | tee log
in case the script is aborted/fails otherwise and doesn't remove the
lockfile, another attempt to obtain the lock ends up in an endless loop

No problem if the user sees the corresponing messages, but when using
shell redirection of stdout and stderr and trying to tee that to a
logfile, the message is never seen/the buffers are not flushed

So force flushing stdout to have the message show up in the terminal

Change-Id: Ib133b9bc523d9ba2210564f75762258f41415f71
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182595
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2025-03-07 13:18:36 +01:00
Christian Lohmaier 7cea20d132 mar: allow parallel creation of diff packages
also include the version number in the base-URL for the mar files in the
json-file

Change-Id: I613ac7c1cf3aeb1eff856c58f00a67151267606c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168100
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2024-06-06 16:00:43 +02:00
LeSasse 2db078c582 tdf#158803 statement ends with an unnessary semicolon
Change-Id: Id67e1a7f944f0aa1aaa5d598305727c913d823cb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165376
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-28 08:45:18 +01:00
Stephan Bergmann 084c64982e Create MAR updates from msi rather than from archive
...as the former is more convenient for release engineering (see the discussion
in the comments at
<https://gerrit.libreoffice.org/c/core/+/162157/1#message-8d7ebbcc64a87ee8e4a073ae1a05e3b74f5a3d6a>
"Also enable --with-package-format=archive for LibreOfficeWin64.conf").

Instead of ONLINEUPDATE_MAR_OLDARCHIVE and ONLINEUPDATE_MAR_OLDMETADATA make
variables, the create-partial-info target now only needs an
ONLINEUPDATE_MAR_OLDMSI make variable.

TODO:  There are two issues when comparing the content of msi files (extracted
with msiexec /a), which the old code comparing the content of archives had tried
to somewhat (but not fully) address with the metadata files that I had invented
(and now reverted):  For one, msiexec /a also extracts content that would
normally be installed somewhere else in the system (e.g., it extracts Fonts,
System, and System64 directories).  Differences in those directories will cause
a MAR update to create those directories in the installation directory, rather
than to update the corresponding files in their actual locations.  For another,
optional components are not recognized as such, but their content must be added
to the MAR file as add/patch-if, not as plain add/patch.  To work around that,
for now *all* files are added as add/patch-if, conditional on the files
themselves.  Thus, addition of files will cause a MAR update to miss them.

(As they now exclusively operate on msi files, the create-update-info and
create-partial-info targets are no longer meaningful for non-Windows platforms,
so drop the non-Windows bin/update/create_full_mar_for_languages.py part.)

Change-Id: Ifb55b5e7d1a201b4f50a27cb449a634b96c2e29b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162399
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-01-22 16:06:42 +01:00
Stephan Bergmann c469bffa3b Further adapting of create-partial-info
...along the lines of what had already been done for create-update-info, passing
files to the mar executable with an -f files.txt instead of on the command line
(which could grow too long for Windows), and taking the archive metadata into
account.

For the latter, `make create-partial-info` now expects a second make variable,
ONLINEUPDATE_MAR_OLDMETADATA, in addition to ONLINEUPDATE_MAR_OLDARCHIVE.  And
there is a new TODO in update/create_partial_update.py that the old and new
metadata should be compared for problematic changes.  (For now, any such changes
would just get lost by an update.)

Change-Id: Ide45adedb72958fc32c5b26aa7ebb01530ccf3d7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161972
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-01-12 15:46:11 +01:00
Stephan Bergmann de98291912 Fix make create-partial-info (for Windows, at least)
I got lost trying to figure out how the original
bin/update/create_partial_update.py code was meant to obtain old and new
installation trees to diff, so I simplified that down to the create-partial-info
make target now expecting an ONLINEUPDATE_MAR_OLDARCHIVE make variable that
points at the old archive install set.  (And the
--with-online-update-mar-serverurl configure option is gone for good again.)
The remaining changes are similar to what was needed in
28bad382fa "Fix `make create-update-info` (for
Windows, at least)".  (And the mbsdiff and mar tools expect Windows-style
pathnames, but mktemp returns a Unix-style pathname in cygwin shell scripts, so
this needed an additional Windows-only external/onlineupdate/cygpath.patch.)

Change-Id: I40690210d62e3f26fb2d574914a0dd4323e6cd62
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161924
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-01-11 21:01:51 +01:00
Stephan Bergmann 189d827b99 Split --with-update-config=... into many --with-online-update-mar-...=...
...and allow each of them to be left off, for debug purposes, even if that may
render the resulting --enable-online-update-mar feature non-functional.

This change tracked each item that was potentially read from the
--with-update-config ini file, and turned each of them into a new
--with-online-update-mar-... option.  The only exception and remaining TODO is
bin/update/upload_build_config.py (called from Makefile.gbuild).

distro-configs/Jenkins/LibreOfficeLinuxUpdater.conf (which might well be dead)
set --with-update-config=~/updater.ini with an ini file of unknown content.  So
that no items are silently missing if we ever resurrect that distro-config, I
set all of the new options to =TODO there for now.

Change-Id: I17a13e0d190a868436bac10c1b0a6675d8c704c0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160622
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2023-12-12 20:43:57 +01:00
Lukas 157298bb80 android and bin/update: make pythonic
Change-Id: Iaf791bfa8d9822843b26f2a2f2c3d94c55a60a0b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133358
Reviewed-by: Arkadiy Illarionov <qarkai@gmail.com>
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2022-06-22 14:07:19 +02:00
Jens Carl 4dc85b98d7 Fix 'is' operator for comparison
The 'is' operator should not be used for comparison on some types of
literals. In CPython this works by accident and CPython 3.8 introduced a
SyntaxWarning (see https://bugs.python.org/issue34850).

Change-Id: I5cb7470132b26d87848c2bdc382b05477eb56afb
Reviewed-on: https://gerrit.libreoffice.org/83032
Tested-by: Jenkins
Reviewed-by: Jens Carl <j.carl43@gmx.de>
2019-11-24 07:41:58 +01:00
Markus Mohrhard f94d98db1b updater: improve message for failed update generation
Change-Id: Iadfcdd58ca77d0906583c63ff81170f54c8c0ecd
2017-11-16 23:19:34 +01:00
Markus Mohrhard b9f85538e6 updater: another place needs to handle additional dir level on windows
Change-Id: I04f784d317b8cfeea25932728f03c92b0b73c70e
2017-08-20 01:39:06 +02:00
Markus Mohrhard e74846af51 updater: get the partial update generation working on windows
Change-Id: I01d8958801e7c5b2d08dd79b0469dfab1f6dee72
Reviewed-on: https://gerrit.libreoffice.org/40757
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-08-04 07:46:40 +02:00
Markus Mohrhard ea9030461d fix construction of directory path
Change-Id: I5fa7ce762ae7e429f685a52b0fed1a1f120da8dd
2017-05-27 17:41:34 +02:00
Markus Mohrhard b4ef794ef5 take the update server url from the config
Change-Id: I9960cbc0b0c9037a1c9cf0ef7a9699bb09ad054e
2017-05-19 23:14:30 +02:00
Markus Mohrhard fdb4b34489 use file instead of complete for the key of the partial update info
Change-Id: Ifbb482a4fd9c1c92e9cdd7769d4b16160de14a86
2017-05-19 03:43:32 +02:00
Markus Mohrhard 4e8a934515 simplify path handling in the updater scripts
Change-Id: Idcf7f9cedc2368f6a4e4e10c2852cc9b1125b712
2017-05-19 03:43:32 +02:00
Markus Mohrhard 3bde01f77a create valid partial language updates and write partial update info
Change-Id: I4000523cfc944657714267958836dd3ce4ec3b0d
2017-05-19 03:43:32 +02:00
Markus Mohrhard 93b0c5bcc7 reuse the new extract mar code for the partial update generation
Change-Id: Ie8c92472631034935e73e55c934ce128c7b6ecd2
2017-05-19 03:43:31 +02:00
Markus Mohrhard fab01f73f1 start working on the creation of partial update files
Change-Id: I13a70e0b12090a7e23529bc35240cefc13d17779
2017-05-19 03:43:31 +02:00