From f821c53a183cdd1b1925559e622601c20611fa15 Mon Sep 17 00:00:00 2001 From: Bernd Wachter Date: Sun, 21 Oct 2012 17:26:52 +0300 Subject: [PATCH] Make ssu configuration permissions hack configurable at build time --- libssu/libssu.pro | 4 ++++ libssu/ssu.cpp | 2 ++ ssu.pro | 7 ++++++- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/libssu/libssu.pro b/libssu/libssu.pro index 50ea700..e853e99 100644 --- a/libssu/libssu.pro +++ b/libssu/libssu.pro @@ -12,4 +12,8 @@ MOBILITY += systeminfo unix:target.path = $${PREFIX}/usr/lib INSTALLS += target +ssuconfhack { + DEFINES += SSUCONFHACK +} + !include( ../buildpath.pri ) { error("Unable to find build path specification") } diff --git a/libssu/ssu.cpp b/libssu/ssu.cpp index c26ad89..2465664 100644 --- a/libssu/ssu.cpp +++ b/libssu/ssu.cpp @@ -16,6 +16,7 @@ QTM_USE_NAMESPACE Ssu::Ssu(): QObject(){ errorFlag = false; +#ifdef SSUCONFHACK // dirty hack to make sure we can write to the configuration // this is currently required since there's no global gconf, // and we migth not yet have users on bootstrap @@ -26,6 +27,7 @@ Ssu::Ssu(): QObject(){ proc.start("/usr/bin/ssuconfperm"); proc.waitForFinished(); } +#endif settings = new QSettings(SSU_CONFIGURATION, QSettings::IniFormat); repoSettings = new QSettings(SSU_REPO_CONFIGURATION, QSettings::IniFormat); diff --git a/ssu.pro b/ssu.pro index 4c88e92..9d99148 100644 --- a/ssu.pro +++ b/ssu.pro @@ -4,7 +4,12 @@ contains(QT_VERSION, ^4\\.[0-7]\\..*) { TEMPLATE = subdirs SUBDIRS = libssu -SUBDIRS += rndssucli rndregisterui ssuurlresolver ssuconfperm +SUBDIRS += rndssucli rndregisterui ssuurlresolver + +ssuconfhack { + SUBDIRS += ssuconfperm +} + SUBDIRS += tests rndssucli.depends = libssu