Merge lp:~charlesk/keeper/remove-click into lp:keeper/devel
- remove-click
- Merge into devel
Status: | Needs review |
---|---|
Proposed branch: | lp:~charlesk/keeper/remove-click |
Merge into: | lp:keeper/devel |
Prerequisite: | lp:~unity-api-team/keeper/sf-errors-dbus-interface |
Diff against target: |
302 lines (+25/-100) 9 files modified
CMakeLists.txt (+1/-5) debian/control (+0/-4) src/helper/CMakeLists.txt (+0/-1) src/service/backup-choices.cpp (+0/-66) tests/integration/helpers/CMakeLists.txt (+0/-5) tests/integration/helpers/test-helpers-base.cpp (+12/-10) tests/unit/manifest/manifest-test.cpp (+4/-3) tests/unit/storage-framework/create-uploader-test.cpp (+4/-3) tests/unit/storage-framework/folders-test.cpp (+4/-3) |
To merge this branch: | bzr merge lp:~charlesk/keeper/remove-click |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
dobey (community) | Needs Fixing | ||
Xavi Garcia (community) | Approve | ||
unity-api-1-bot | continuous-integration | Approve | |
Review via email: mp+314500@code.launchpad.net |
Commit message
remove click, glib, properties-cpp dependencies
Description of the change
remove dependencies:
* click: dropping click support
* glib - unused except for trivial g_setenv() and g_unsetenv() calls
* properties-cpp: no longer used
unity-api-1-bot (unity-api-1-bot) wrote : | # |
unity-api-1-bot (unity-api-1-bot) wrote : | # |
FAILED: Continuous integration, rev:140
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
Xavi Garcia (xavi-garcia-mena) wrote : | # |
Not sure why Jenkins is not happy about the branch.
In some builds I don't see a clear reason.
This is what amd64/zesty complains about:
/usr/bin/ld: cannot find -lpthread
Aside from that the branch looks good to me.
unity-api-1-bot (unity-api-1-bot) wrote : | # |
FAILED: Continuous integration, rev:
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
- 141. By Charles Kerr
-
remove properties-cpp from dependencies; we don't use it
- 142. By Charles Kerr
-
remove glib from dendencies; we don't use it
unity-api-1-bot (unity-api-1-bot) wrote : | # |
FAILED: Continuous integration, rev:
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
unity-api-1-bot (unity-api-1-bot) wrote : | # |
FAILED: Continuous integration, rev:142
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
- 143. By Charles Kerr
-
finish r140 by removing click from pkg-config invocation
unity-api-1-bot (unity-api-1-bot) wrote : | # |
PASSED: Continuous integration, rev:
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
unity-api-1-bot (unity-api-1-bot) wrote : | # |
PASSED: Continuous integration, rev:143
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
- 144. By Charles Kerr
-
remove other unused dependencies
unity-api-1-bot (unity-api-1-bot) wrote : | # |
PASSED: Continuous integration, rev:144
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
SUCCESS: https:/
deb: https:/
Click here to trigger a rebuild:
https:/
Xavi Garcia (xavi-garcia-mena) wrote : | # |
Good clean up! Looks good to me
Unmerged revisions
- 144. By Charles Kerr
-
remove other unused dependencies
- 143. By Charles Kerr
-
finish r140 by removing click from pkg-config invocation
- 142. By Charles Kerr
-
remove glib from dendencies; we don't use it
- 141. By Charles Kerr
-
remove properties-cpp from dependencies; we don't use it
- 140. By Charles Kerr
-
remove libclick use
- 139. By Charles Kerr
-
remove json-glib dependency
Preview Diff
1 | === modified file 'CMakeLists.txt' |
2 | --- CMakeLists.txt 2017-01-11 20:31:15 +0000 |
3 | +++ CMakeLists.txt 2017-01-11 20:31:16 +0000 |
4 | @@ -54,7 +54,7 @@ |
5 | ## Toolkits |
6 | ## |
7 | |
8 | -find_package(Threads REQUIRED) |
9 | +#find_package(Threads REQUIRED) |
10 | |
11 | set(CMAKE_AUTOMOC ON) |
12 | set(CMAKE_INCLUDE_CURRENT_DIR ON) |
13 | @@ -79,10 +79,6 @@ |
14 | find_package(PkgConfig REQUIRED) |
15 | |
16 | pkg_check_modules(SERVICE_DEPS REQUIRED |
17 | - click-0.4>=0.4.30 |
18 | - glib-2.0 |
19 | - gobject-2.0 |
20 | - json-glib-1.0 |
21 | libarchive>=3.1.2 |
22 | uuid>=2.25 |
23 | ) |
24 | |
25 | === modified file 'debian/control' |
26 | --- debian/control 2016-12-14 15:11:28 +0000 |
27 | +++ debian/control 2017-01-11 20:31:16 +0000 |
28 | @@ -8,12 +8,9 @@ |
29 | debhelper (>= 9), |
30 | # for building the code: |
31 | libarchive-dev (>= 3.1.2), |
32 | - libproperties-cpp-dev, |
33 | libubuntu-app-launch2-dev (>= 0.9), |
34 | storage-framework-client-dev, |
35 | - libclick-0.4-dev, |
36 | uuid-dev, |
37 | - libglib2.0-dev, |
38 | qt5-default, |
39 | qtbase5-dev, |
40 | qtbase5-dev-tools, |
41 | @@ -25,7 +22,6 @@ |
42 | libgtest-dev, |
43 | google-mock (>= 1.6.0+svn437), |
44 | python3-dbusmock (>= 0.16.3), |
45 | - libdbustest1-dev, |
46 | libqtdbusmock1-dev (>= 0.4), |
47 | libqtdbustest1-dev, |
48 | # for the dbusmock template: |
49 | |
50 | === modified file 'src/helper/CMakeLists.txt' |
51 | --- src/helper/CMakeLists.txt 2016-12-05 11:36:32 +0000 |
52 | +++ src/helper/CMakeLists.txt 2017-01-11 20:31:16 +0000 |
53 | @@ -46,7 +46,6 @@ |
54 | include(FindPkgConfig) |
55 | pkg_check_modules(BACKUP_HELPER_DEPENDENCIES REQUIRED |
56 | ubuntu-app-launch-2 |
57 | - properties-cpp |
58 | ) |
59 | |
60 | include_directories( |
61 | |
62 | === modified file 'src/service/backup-choices.cpp' |
63 | --- src/service/backup-choices.cpp 2017-01-11 20:31:15 +0000 |
64 | +++ src/service/backup-choices.cpp 2017-01-11 20:31:16 +0000 |
65 | @@ -19,15 +19,9 @@ |
66 | |
67 | #include "service/backup-choices.h" |
68 | |
69 | -#include <click.h> |
70 | - |
71 | #include <uuid/uuid.h> |
72 | |
73 | #include <QDebug> |
74 | -#include <QJsonArray> |
75 | -#include <QJsonDocument> |
76 | -#include <QJsonObject> |
77 | -#include <QJsonValue> |
78 | #include <QStandardPaths> |
79 | #include <QString> |
80 | |
81 | @@ -72,66 +66,6 @@ |
82 | } |
83 | |
84 | // |
85 | - // Click Packages |
86 | - // |
87 | - |
88 | - QString manifests_str; |
89 | - GError* error {}; |
90 | - auto user = click_user_new_for_user(nullptr, nullptr, &error); |
91 | - if (user != nullptr) |
92 | - { |
93 | - auto tmp = click_user_get_manifests_as_string (user, &error); |
94 | - manifests_str = QString::fromUtf8(tmp); |
95 | - g_clear_pointer(&tmp, g_free); |
96 | - g_clear_object(&user); |
97 | - } |
98 | - if (error != nullptr) |
99 | - { |
100 | - qCritical() << "Error getting click manifests:" << error->message; |
101 | - g_clear_error(&error); |
102 | - } |
103 | - |
104 | - auto loadDoc = QJsonDocument::fromJson(manifests_str.toUtf8()); |
105 | - auto tmp = loadDoc.toJson(); |
106 | - if (loadDoc.isArray()) |
107 | - { |
108 | - auto manifests = loadDoc.array(); |
109 | - for(auto it=manifests.begin(), end=manifests.end(); it!=end; ++it) |
110 | - { |
111 | - const auto& manifest (*it); |
112 | - if (manifest.isObject()) |
113 | - { |
114 | - auto o = manifest.toObject(); |
115 | - |
116 | - // manditory name |
117 | - const auto name = o[Metadata::NAME_KEY]; |
118 | - if (name == QJsonValue::Undefined) |
119 | - continue; |
120 | - |
121 | - // manditory title |
122 | - const auto title = o[Metadata::TITLE_KEY]; |
123 | - if (title == QJsonValue::Undefined) |
124 | - continue; |
125 | - QString display_name = title.toString(); |
126 | - |
127 | - // if version is available, append it to display_name |
128 | - const auto version = o[Metadata::VERSION_KEY]; |
129 | - if (version != QJsonValue::Undefined) |
130 | - display_name = QStringLiteral("%1 (%2)").arg(display_name).arg(version.toString()); |
131 | - |
132 | - Metadata m(generate_new_uuid(), display_name); |
133 | - m.set_property_value(Metadata::PACKAGE_KEY, name.toString()); |
134 | - m.set_property_value(Metadata::TYPE_KEY, Metadata::APPLICATION_VALUE); |
135 | - |
136 | - if (version != QJsonValue::Undefined) |
137 | - m.set_property_value(Metadata::VERSION_KEY, version.toString()); |
138 | - |
139 | - backups_.push_back(m); |
140 | - } |
141 | - } |
142 | - } |
143 | - |
144 | - // |
145 | // XDG User Directories |
146 | // |
147 | |
148 | |
149 | === modified file 'tests/integration/helpers/CMakeLists.txt' |
150 | --- tests/integration/helpers/CMakeLists.txt 2016-11-11 14:50:06 +0000 |
151 | +++ tests/integration/helpers/CMakeLists.txt 2017-01-11 20:31:16 +0000 |
152 | @@ -11,11 +11,6 @@ |
153 | |
154 | pkg_check_modules(HELPERS_TEST_DEPS REQUIRED |
155 | ubuntu-app-launch-2 |
156 | - properties-cpp |
157 | - dbustest-1>=14.04.0 |
158 | - glib-2.0>=2.26 |
159 | - gio-2.0>=2.26 |
160 | - gio-unix-2.0 |
161 | ) |
162 | |
163 | include_directories( |
164 | |
165 | === modified file 'tests/integration/helpers/test-helpers-base.cpp' |
166 | --- tests/integration/helpers/test-helpers-base.cpp 2017-01-11 20:31:15 +0000 |
167 | +++ tests/integration/helpers/test-helpers-base.cpp 2017-01-11 20:31:16 +0000 |
168 | @@ -26,6 +26,8 @@ |
169 | #include <sys/types.h> |
170 | #include <signal.h> |
171 | |
172 | +#include <cstdlib> // setenv(), unsetenv() |
173 | + |
174 | using namespace QtDBusTest; |
175 | using namespace QtDBusMock; |
176 | |
177 | @@ -379,25 +381,25 @@ |
178 | Helper::registerMetaTypes(); |
179 | DBusTypes::registerMetaTypes(); |
180 | |
181 | - g_setenv("XDG_DATA_DIRS", CMAKE_SOURCE_DIR, true); |
182 | - g_setenv("XDG_CACHE_HOME", CMAKE_SOURCE_DIR "/libertine-data", true); |
183 | - g_setenv("XDG_DATA_HOME", xdg_data_home_dir.path().toLatin1().data(), true); |
184 | + setenv("XDG_DATA_DIRS", CMAKE_SOURCE_DIR, true); |
185 | + setenv("XDG_CACHE_HOME", CMAKE_SOURCE_DIR "/libertine-data", true); |
186 | + setenv("XDG_DATA_HOME", xdg_data_home_dir.path().toLatin1().data(), true); |
187 | |
188 | qDebug() << "XDG_DATA_HOME ON SETUP is:" << xdg_data_home_dir.path(); |
189 | |
190 | - g_setenv("DBUS_SYSTEM_BUS_ADDRESS", dbus_test_runner.systemBus().toStdString().c_str(), true); |
191 | - g_setenv("DBUS_SESSION_BUS_ADDRESS", dbus_test_runner.sessionBus().toStdString().c_str(), true); |
192 | + setenv("DBUS_SYSTEM_BUS_ADDRESS", dbus_test_runner.systemBus().toStdString().c_str(), true); |
193 | + setenv("DBUS_SESSION_BUS_ADDRESS", dbus_test_runner.sessionBus().toStdString().c_str(), true); |
194 | |
195 | dbus_test_runner.startServices(); |
196 | } |
197 | |
198 | void TestHelpersBase::TearDown() |
199 | { |
200 | - g_unsetenv("XDG_DATA_DIRS"); |
201 | - g_unsetenv("XDG_CACHE_HOME"); |
202 | - g_unsetenv("XDG_DATA_HOME"); |
203 | - g_unsetenv("DBUS_SYSTEM_BUS_ADDRESS"); |
204 | - g_unsetenv("DBUS_SESSION_BUS_ADDRESS"); |
205 | + unsetenv("XDG_DATA_DIRS"); |
206 | + unsetenv("XDG_CACHE_HOME"); |
207 | + unsetenv("XDG_DATA_HOME"); |
208 | + unsetenv("DBUS_SYSTEM_BUS_ADDRESS"); |
209 | + unsetenv("DBUS_SESSION_BUS_ADDRESS"); |
210 | |
211 | // if the test failed, keep the artifacts so devs can examine them |
212 | QDir data_home_dir(CMAKE_SOURCE_DIR "/libertine-home"); |
213 | |
214 | === modified file 'tests/unit/manifest/manifest-test.cpp' |
215 | --- tests/unit/manifest/manifest-test.cpp 2017-01-11 20:31:15 +0000 |
216 | +++ tests/unit/manifest/manifest-test.cpp 2017-01-11 20:31:16 +0000 |
217 | @@ -31,7 +31,8 @@ |
218 | #include <QTemporaryDir> |
219 | |
220 | #include <gtest/gtest.h> |
221 | -#include <glib.h> |
222 | + |
223 | +#include <cstdlib> // setenv(), unsetenv() |
224 | |
225 | TEST(ManifestClass, AddEntries) |
226 | { |
227 | @@ -74,7 +75,7 @@ |
228 | QTemporaryDir tmp_dir; |
229 | QString test_dir = QStringLiteral("test_dir"); |
230 | |
231 | - g_setenv("XDG_DATA_HOME", tmp_dir.path().toLatin1().data(), true); |
232 | + setenv("XDG_DATA_HOME", tmp_dir.path().toLatin1().data(), true); |
233 | |
234 | QSharedPointer<StorageFrameworkClient> sf_client(new StorageFrameworkClient, [](StorageFrameworkClient* sf){sf->deleteLater();}); |
235 | Manifest manifest(sf_client, test_dir); |
236 | @@ -166,5 +167,5 @@ |
237 | EXPECT_EQ(metadata_with_sf[i], original_metadata[i]); |
238 | } |
239 | |
240 | - g_unsetenv("XDG_DATA_HOME"); |
241 | + unsetenv("XDG_DATA_HOME"); |
242 | } |
243 | |
244 | === modified file 'tests/unit/storage-framework/create-uploader-test.cpp' |
245 | --- tests/unit/storage-framework/create-uploader-test.cpp 2016-11-11 14:50:06 +0000 |
246 | +++ tests/unit/storage-framework/create-uploader-test.cpp 2017-01-11 20:31:16 +0000 |
247 | @@ -26,7 +26,8 @@ |
248 | #include <QTemporaryDir> |
249 | |
250 | #include <gtest/gtest.h> |
251 | -#include <glib.h> |
252 | + |
253 | +#include <cstdlib> // setenv(), unsetenv() |
254 | |
255 | namespace sf = unity::storage::qt::client; |
256 | |
257 | @@ -43,7 +44,7 @@ |
258 | QString test_dir = QStringLiteral("test_dir"); |
259 | QString test_file_name = QStringLiteral("test_file"); |
260 | |
261 | - g_setenv("XDG_DATA_HOME", tmp_dir.path().toLatin1().data(), true); |
262 | + setenv("XDG_DATA_HOME", tmp_dir.path().toLatin1().data(), true); |
263 | qDebug() << "XDG_DATA_HOME is:" << qPrintable(tmp_dir.path()); |
264 | |
265 | StorageFrameworkClient sf_client; |
266 | @@ -143,5 +144,5 @@ |
267 | // check that files are exactly the same than before the second uploader |
268 | EXPECT_EQ(sf_files, sf_files_after_dispose); |
269 | |
270 | - g_unsetenv("XDG_DATA_HOME"); |
271 | + unsetenv("XDG_DATA_HOME"); |
272 | } |
273 | |
274 | === modified file 'tests/unit/storage-framework/folders-test.cpp' |
275 | --- tests/unit/storage-framework/folders-test.cpp 2016-10-28 15:11:21 +0000 |
276 | +++ tests/unit/storage-framework/folders-test.cpp 2017-01-11 20:31:16 +0000 |
277 | @@ -26,7 +26,8 @@ |
278 | #include <QTemporaryDir> |
279 | |
280 | #include <gtest/gtest.h> |
281 | -#include <glib.h> |
282 | + |
283 | +#include <cstdlib> // setenv(), unsetenv() |
284 | |
285 | namespace sf = unity::storage::qt::client; |
286 | |
287 | @@ -42,7 +43,7 @@ |
288 | test_dirs.push_back(QString("test_dir_%1").arg(i+1)); |
289 | } |
290 | |
291 | - g_setenv("XDG_DATA_HOME", tmp_dir.path().toLatin1().data(), true); |
292 | + setenv("XDG_DATA_HOME", tmp_dir.path().toLatin1().data(), true); |
293 | StorageFrameworkClient sf_client; |
294 | |
295 | for (auto i = 0; i < nb_tests; ++i) |
296 | @@ -105,5 +106,5 @@ |
297 | EXPECT_TRUE(found); |
298 | } |
299 | |
300 | - g_unsetenv("XDG_DATA_HOME"); |
301 | + unsetenv("XDG_DATA_HOME"); |
302 | } |
FAILED: Continuous integration, rev:140 /jenkins. canonical. com/unity- api-1/job/ lp-keeper- ci/166/ /jenkins. canonical. com/unity- api-1/job/ build/1340/ console /jenkins. canonical. com/unity- api-1/job/ build-0- fetch/1347 /jenkins. canonical. com/unity- api-1/job/ build-2- binpkg/ arch=amd64, release= xenial+ overlay/ 1125/console /jenkins. canonical. com/unity- api-1/job/ build-2- binpkg/ arch=amd64, release= zesty/1125/ console /jenkins. canonical. com/unity- api-1/job/ build-2- binpkg/ arch=armhf, release= xenial+ overlay/ 1125/console /jenkins. canonical. com/unity- api-1/job/ build-2- binpkg/ arch=armhf, release= zesty/1125/ console /jenkins. canonical. com/unity- api-1/job/ build-2- binpkg/ arch=i386, release= xenial+ overlay/ 1125/console /jenkins. canonical. com/unity- api-1/job/ build-2- binpkg/ arch=i386, release= zesty/1125/ console
https:/
Executed test runs:
FAILURE: https:/
SUCCESS: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild: /jenkins. canonical. com/unity- api-1/job/ lp-keeper- ci/166/ rebuild
https:/