[Libreoffice-commits] core.git: l10ntools/source
Stephan Bergmann (via logerrit)
logerrit at kemper.freedesktop.org
Wed Dec 9 13:17:40 UTC 2020
l10ntools/source/merge.cxx | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
New commits:
commit dbce9c45f5b59e69eac580f0931a39dabae25a81
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Wed Dec 9 10:51:06 2020 +0100
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Wed Dec 9 14:17:01 2020 +0100
Apparently, Windows doesn't have the concept of a set but empty env var
...so in an (implicitly) --disable-release-build build (where config_host.mk
contains a
export ENABLE_RELEASE_BUILD=
line), getenv("ENABLE_RELEASE_BUILD") returns null, and after
a5484e496dcee9b110ef696101576a14b7a5a20e "Assert that certain env vars are set
in these build-time tools" e.g. `make CustomTarget_librelogo/locproperties`
started to fail with
> [build PRP] CustomTarget/librelogo/locproperties/LibreLogo_de.properties
> S=C:/lo/core && I=$S/instdir && W=$S/workdir && MERGEINPUT=C:/cygwin64/tmp/gbuild.iDa6ga && PATH="C:\lo\core\instdir\program;C:\lo\core\instdir\program;$PATH" $W/LinkTarget/Executable/propex.exe -i $S/librelogo/source/pythonpath/LibreLogo_en_US.properties -o $W/CustomTarget/librelogo/locproperties/LibreLogo_de.properties -m ${MERGEINPUT} -l de && rm -rf ${MERGEINPUT}
> Assertion failed: env != nullptr, file C:/lo/core/l10ntools/source/merge.cxx, line 117
> make[1]: *** [C:/lo/core/librelogo/CustomTarget_librelogo.mk:38: C:/lo/core/workdir/CustomTarget/librelogo/locproperties/LibreLogo_de.properties] Error 3
The other asserts added with a5484e496dcee9b110ef696101576a14b7a5a20e should be
OK, though:
* SRC_ROOT should never be empty.
* WORKDIR_FOR_BUILD could presumably be empty in a cross-compilation build
($cross_compile = yes in configure.ac), but the code in
l10ntools/source/localize.cxx apparently expects WORKDIR_FOR_BUILD not to be
empty anyway. (And at least in a nominally cross-compilation build with
--host=i686-pc-cygwin on Windows x64, $cross-compile is
left empty in configure.ac and WORKDIR_FOR_BUILD is set to a non-empty value.)
* ALL_LANGS should never be empty given how it is set in configure.ac, even if
the code in l10ntools/source/pocheck.cxx contains an explicit
if( aLanguages.isEmpty() )
check.
Change-Id: I06b216587f5d76e4b5d5abc748ff34308f2e9dbb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107462
Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
Tested-by: Jenkins
diff --git a/l10ntools/source/merge.cxx b/l10ntools/source/merge.cxx
index b94bb7c84fc8..694e48f23f4f 100644
--- a/l10ntools/source/merge.cxx
+++ b/l10ntools/source/merge.cxx
@@ -21,7 +21,6 @@
#include <sal/log.hxx>
#include <algorithm>
-#include <cassert>
#include <fstream>
#include <string>
#include <vector>
@@ -114,8 +113,7 @@ MergeDataFile::MergeDataFile(
bool bCaseSensitive, bool bWithQtz )
{
auto const env = getenv("ENABLE_RELEASE_BUILD");
- assert(env != nullptr);
- OString sEnableReleaseBuild(env);
+ OString sEnableReleaseBuild(env == nullptr ? "" : env);
std::ifstream aInputStream( rFileName.getStr() );
if ( !aInputStream.is_open() )
More information about the Libreoffice-commits
mailing list