[Libreoffice-commits] core.git: desktop/source
Markus Mohrhard
markus.mohrhard at googlemail.com
Wed Aug 2 05:28:51 UTC 2017
desktop/source/app/app.cxx | 6 +++---
desktop/source/app/updater.cxx | 11 +++++++++--
desktop/source/app/updater.hxx | 2 ++
3 files changed, 14 insertions(+), 5 deletions(-)
New commits:
commit a0c54ff9a6b92d220a1eb7099dd2ecd2bd92056f
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Tue Aug 1 20:39:39 2017 +0200
updater: extract the build ID generation into own method
Change-Id: Ieee90215c155d031da40b2d9d0b50bc41ff2e980
Reviewed-on: https://gerrit.libreoffice.org/40652
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index e337130f66c3..0e9998d11581 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -1393,11 +1393,11 @@ int Desktop::Main()
OUString aSeeAlso = officecfg::Office::Update::Update::SeeAlso::get();
OUString aOldBuildID = officecfg::Office::Update::Update::OldBuildID::get();
- OUString aBuildID("${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("version") ":buildid}");
- rtl::Bootstrap::expandMacros(aBuildID);
+ OUString aBuildID = Updater::getBuildID();
if (aOldBuildID == aBuildID)
{
- SAL_INFO("desktop", "failed updater");
+ SAL_INFO("desktop", "No updating took place.");
+ Updater::log("Old and new Build ID are the same. No Updating took place.");
}
else
{
diff --git a/desktop/source/app/updater.cxx b/desktop/source/app/updater.cxx
index 782bfef9079b..24891fa8ae8e 100644
--- a/desktop/source/app/updater.cxx
+++ b/desktop/source/app/updater.cxx
@@ -668,8 +668,7 @@ void update_checker()
}
OUString aProductName = utl::ConfigManager::getProductName();
- OUString aBuildID("${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("version") ":buildid}");
- rtl::Bootstrap::expandMacros(aBuildID);
+ OUString aBuildID = Updater::getBuildID();
OUString aBuildTarget = "${_OS}_${_ARCH}";
rtl::Bootstrap::expandMacros(aBuildTarget);
OUString aChannel = officecfg::Office::Update::Update::UpdateChannel::get();
@@ -813,4 +812,12 @@ void Updater::log(const char* pMessage)
aLog.WriteCharPtr(pMessage);
}
+OUString Updater::getBuildID()
+{
+ OUString aBuildID("${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("version") ":buildid}");
+ rtl::Bootstrap::expandMacros(aBuildID);
+
+ return aBuildID;
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/app/updater.hxx b/desktop/source/app/updater.hxx
index 922d5264ec5e..214777fcba29 100644
--- a/desktop/source/app/updater.hxx
+++ b/desktop/source/app/updater.hxx
@@ -28,6 +28,8 @@ public:
static OUString getUpdateDirURL();
static OUString getExecutableDirURL();
+ static OUString getBuildID();
+
static void log(const OUString& rMessage);
static void log(const OString& rMessage);
static void log(const char* pMessage);
More information about the Libreoffice-commits
mailing list