Merge lp:~ted/ubuntu-app-launch/liblibertine-dep into lp:ubuntu-app-launch/15.10

Proposed by Ted Gould
Status: Work in progress
Proposed branch: lp:~ted/ubuntu-app-launch/liblibertine-dep
Merge into: lp:ubuntu-app-launch/15.10
Diff against target: 158 lines (+69/-4)
6 files modified
CMakeLists.txt (+3/-0)
debian/control (+1/-0)
libubuntu-app-launch/CMakeLists.txt (+1/-0)
libubuntu-app-launch/app-info.c (+38/-2)
libubuntu-app-launch/ubuntu-app-launch.c (+3/-2)
tests/libertine-home/libertine/ContainersConfig.json (+23/-0)
To merge this branch: bzr merge lp:~ted/ubuntu-app-launch/liblibertine-dep
Reviewer Review Type Date Requested Status
Indicator Applet Developers Pending
Review via email: mp+269204@code.launchpad.net

Commit message

Remove libertine custom code with calls to liblibertine

Description of the change

NOTE: Requires liblibertine to get into the archive.

To post a comment you must log in.
213. By Ted Gould

Dep on liblibertine

Unmerged revisions

213. By Ted Gould

Dep on liblibertine

212. By Ted Gould

Use liblibertine in ual.c

211. By Ted Gould

Use a boolean to track and keep the iter in the 'if'

210. By Ted Gould

Migrate the app-info code to liblibertine

209. By Ted Gould

Connecting in liblibertine

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2015-08-11 02:45:49 +0000
+++ CMakeLists.txt 2015-08-26 13:15:07 +0000
@@ -77,6 +77,9 @@
77pkg_check_modules(MIR mirclient)77pkg_check_modules(MIR mirclient)
78include_directories(${MIR_INCLUDE_DIRS})78include_directories(${MIR_INCLUDE_DIRS})
7979
80pkg_check_modules(LIBERTINE libertine)
81include_directories(${LIBERTINE_INCLUDE_DIRS})
82
80include_directories(${CMAKE_CURRENT_SOURCE_DIR})83include_directories(${CMAKE_CURRENT_SOURCE_DIR})
8184
82set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")85set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
8386
=== modified file 'debian/control'
--- debian/control 2015-07-31 00:15:57 +0000
+++ debian/control 2015-08-26 13:15:07 +0000
@@ -15,6 +15,7 @@
15 libglib2.0-dev,15 libglib2.0-dev,
16 libgtest-dev,16 libgtest-dev,
17 libjson-glib-dev,17 libjson-glib-dev,
18 liblibertine-dev,
18 liblttng-ust-dev,19 liblttng-ust-dev,
19 libmirclient-dev (>= 0.5),20 libmirclient-dev (>= 0.5),
20 libnih-dbus-dev,21 libnih-dbus-dev,
2122
=== modified file 'libubuntu-app-launch/CMakeLists.txt'
--- libubuntu-app-launch/CMakeLists.txt 2015-08-11 19:11:15 +0000
+++ libubuntu-app-launch/CMakeLists.txt 2015-08-26 13:15:07 +0000
@@ -59,6 +59,7 @@
59 ${CLICK_LIBRARIES}59 ${CLICK_LIBRARIES}
60 ${ZEITGEIST_LIBRARIES}60 ${ZEITGEIST_LIBRARIES}
61 ${MIR_LIBRARIES}61 ${MIR_LIBRARIES}
62 ${LIBERTINE_LIBRARIES}
62 helpers63 helpers
63 -Wl,--no-undefined64 -Wl,--no-undefined
64)65)
6566
=== modified file 'libubuntu-app-launch/app-info.c'
--- libubuntu-app-launch/app-info.c 2015-08-12 02:52:05 +0000
+++ libubuntu-app-launch/app-info.c 2015-08-26 13:15:07 +0000
@@ -19,6 +19,7 @@
1919
20#include <json-glib/json-glib.h>20#include <json-glib/json-glib.h>
21#include <click.h>21#include <click.h>
22#include <libertine.h>
2223
23#include "ubuntu-app-launch.h"24#include "ubuntu-app-launch.h"
24#include "app-info.h"25#include "app-info.h"
@@ -258,19 +259,54 @@
258 return FALSE;259 return FALSE;
259 }260 }
260261
262 gchar ** containerlist = libertine_list_containers();
263
264 if (true) {
265 gchar * containerstr = g_strjoinv(", ", containerlist);
266 g_debug("Libertine Containers: %s", containerstr);
267 g_free(containerstr);
268 }
269
270 gboolean validcontainer = FALSE;
271 if (containerlist != NULL && containerlist[0] != NULL) {
272 gchar ** containeriter = NULL;
273 for (containeriter = containerlist; *containeriter != NULL; containeriter++) {
274 if (g_strcmp0(*containeriter, container) == 0) {
275 validcontainer = TRUE;
276 break;
277 }
278 }
279 }
280
281 g_strfreev(containerlist);
282
283 if (!validcontainer) {
284 g_warning("Container '%s' is not in the libertine container list", container);
285 return FALSE;
286 }
287
261 gchar * desktopname = g_strdup_printf("%s.desktop", app);288 gchar * desktopname = g_strdup_printf("%s.desktop", app);
262289
263 gchar * desktopdir = g_build_filename(g_get_user_cache_dir(), "libertine-container", container, "rootfs", "usr", "share", NULL);290 gchar * libertinedir = libertine_container_path(container);
291 gchar * desktopdir = g_build_filename(libertinedir, "usr", "share", NULL);
292 g_free(libertinedir);
293
264 gchar * desktopfile = g_build_filename(desktopdir, "applications", desktopname, NULL);294 gchar * desktopfile = g_build_filename(desktopdir, "applications", desktopname, NULL);
265295
266 if (!g_file_test(desktopfile, G_FILE_TEST_EXISTS)) {296 if (!g_file_test(desktopfile, G_FILE_TEST_EXISTS)) {
297 g_debug("Unable to find desktop file '%s' in container '%s' (checking userdir)", desktopfile, container);
298
267 g_free(desktopdir);299 g_free(desktopdir);
268 g_free(desktopfile);300 g_free(desktopfile);
269301
270 desktopdir = g_build_filename(g_get_user_data_dir(), "libertine-container", "user-data", container, ".local", "share", NULL);302 libertinedir = libertine_container_home_path(container);
303 desktopdir = g_build_filename(libertinedir, ".local", "share", NULL);
304 g_free(libertinedir);
271 desktopfile = g_build_filename(desktopdir, "applications", desktopname, NULL);305 desktopfile = g_build_filename(desktopdir, "applications", desktopname, NULL);
272306
273 if (!g_file_test(desktopfile, G_FILE_TEST_EXISTS)) {307 if (!g_file_test(desktopfile, G_FILE_TEST_EXISTS)) {
308 g_debug("Unable to find desktop file '%s' in container '%s' (now failing)", desktopfile, container);
309
274 g_free(desktopdir);310 g_free(desktopdir);
275 g_free(desktopfile);311 g_free(desktopfile);
276312
277313
=== modified file 'libubuntu-app-launch/ubuntu-app-launch.c'
--- libubuntu-app-launch/ubuntu-app-launch.c 2015-08-17 21:38:29 +0000
+++ libubuntu-app-launch/ubuntu-app-launch.c 2015-08-26 13:15:07 +0000
@@ -25,6 +25,7 @@
25#include <fcntl.h>25#include <fcntl.h>
26#include <errno.h>26#include <errno.h>
27#include <zeitgeist.h>27#include <zeitgeist.h>
28#include <libertine.h>
2829
29#include "ubuntu-app-launch-trace.h"30#include "ubuntu-app-launch-trace.h"
30#include "second-exec-core.h"31#include "second-exec-core.h"
@@ -1630,8 +1631,8 @@
1630 g_return_val_if_fail(pkg != NULL, NULL);1631 g_return_val_if_fail(pkg != NULL, NULL);
16311632
1632 /* Check if is a libertine container */1633 /* Check if is a libertine container */
1633 gchar * libertinepath = g_build_filename(g_get_user_cache_dir(), "libertine-container", pkg, NULL);1634 gchar * libertinepath = libertine_container_path(pkg);
1634 gboolean libcontainer = g_file_test(libertinepath, G_FILE_TEST_EXISTS);1635 gboolean libcontainer = libertinepath != NULL;
1635 g_free(libertinepath);1636 g_free(libertinepath);
16361637
1637 if (libcontainer) {1638 if (libcontainer) {
16381639
=== added directory 'tests/libertine-home/libertine'
=== added file 'tests/libertine-home/libertine/ContainersConfig.json'
--- tests/libertine-home/libertine/ContainersConfig.json 1970-01-01 00:00:00 +0000
+++ tests/libertine-home/libertine/ContainersConfig.json 2015-08-26 13:15:07 +0000
@@ -0,0 +1,23 @@
1{
2 "containerList": [
3 {
4 "id": "another-container",
5 "image": "wily",
6 "installStatus": "new",
7 "installedApps": [
8 ],
9 "name": "Ubuntu 'Wily Werewolf'",
10 "type": "lxc"
11 },
12 {
13 "id": "container-name",
14 "image": "wily",
15 "installStatus": "new",
16 "installedApps": [
17 ],
18 "name": "Ubuntu 'Wily Werewolf'",
19 "type": "lxc"
20 }
21 ],
22 "defaultContainer": "container-name"
23}

Subscribers

People subscribed via source and target branches