Merge lp:~ted/ubuntu-app-launch/libertine-id-field into lp:ubuntu-app-launch/16.10

Proposed by Ted Gould
Status: Merged
Approved by: Marcus Tomlinson
Approved revision: 253
Merged at revision: 261
Proposed branch: lp:~ted/ubuntu-app-launch/libertine-id-field
Merge into: lp:ubuntu-app-launch/16.10
Prerequisite: lp:~ci-train-bot/ubuntu-app-launch/ubuntu-app-launch-ubuntu-yakkety-landing-1944
Diff against target: 95 lines (+29/-9)
4 files modified
libubuntu-app-launch/application-impl-legacy.cpp (+17/-1)
libubuntu-app-launch/application-impl-libertine.cpp (+1/-1)
libubuntu-app-launch/application-impl-snap.cpp (+8/-4)
tests/exec-util-test.cc (+3/-3)
To merge this branch: bzr merge lp:~ted/ubuntu-app-launch/libertine-id-field
Reviewer Review Type Date Requested Status
Marcus Tomlinson (community) Approve
unity-api-1-bot continuous-integration Approve
Review via email: mp+305865@code.launchpad.net

Commit message

Use the --id field for launching with libertine-launch and use it for setting up other X11 environments

To post a comment you must log in.
Revision history for this message
unity-api-1-bot (unity-api-1-bot) wrote :

PASSED: Continuous integration, rev:253
https://jenkins.canonical.com/unity-api-1/job/lp-ubuntu-app-launch-ci/102/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build/666
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-0-fetch/672
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=vivid+overlay/487
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=vivid+overlay/487/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/487
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/487/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=yakkety/487
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=yakkety/487/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=vivid+overlay/487
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=vivid+overlay/487/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/487
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/487/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=yakkety/487
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=yakkety/487/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=vivid+overlay/487
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=vivid+overlay/487/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/487
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/487/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=yakkety/487
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=yakkety/487/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/unity-api-1/job/lp-ubuntu-app-launch-ci/102/rebuild

review: Approve (continuous-integration)
Revision history for this message
Marcus Tomlinson (marcustomlinson) wrote :

Looks good (Great test coverage in this project btw!)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'libubuntu-app-launch/application-impl-legacy.cpp'
2--- libubuntu-app-launch/application-impl-legacy.cpp 2016-09-15 17:15:22 +0000
3+++ libubuntu-app-launch/application-impl-legacy.cpp 2016-09-15 17:15:24 +0000
4@@ -303,7 +303,23 @@
5 info();
6
7 retval.emplace_back(std::make_pair("APP_XMIR_ENABLE", appinfo_->xMirEnable().value() ? "1" : "0"));
8- retval.emplace_back(std::make_pair("APP_EXEC", appinfo_->execLine().value()));
9+ if (appinfo_->xMirEnable())
10+ {
11+ /* If we're setting up XMir we also need the other helpers
12+ that libertine is helping with */
13+ auto libertine_launch = g_getenv("UBUNTU_APP_LAUNCH_LIBERTINE_LAUNCH");
14+ if (libertine_launch == nullptr)
15+ {
16+ libertine_launch = LIBERTINE_LAUNCH;
17+ }
18+
19+ retval.emplace_back(
20+ std::make_pair("APP_EXEC", std::string(libertine_launch) + " " + appinfo_->execLine().value()));
21+ }
22+ else
23+ {
24+ retval.emplace_back(std::make_pair("APP_EXEC", appinfo_->execLine().value()));
25+ }
26
27 /* Honor the 'Path' key if it is in the desktop file */
28 if (g_key_file_has_key(_keyfile.get(), "Desktop Entry", "Path", nullptr))
29
30=== modified file 'libubuntu-app-launch/application-impl-libertine.cpp'
31--- libubuntu-app-launch/application-impl-libertine.cpp 2016-09-15 17:15:22 +0000
32+++ libubuntu-app-launch/application-impl-libertine.cpp 2016-09-15 17:15:24 +0000
33@@ -300,7 +300,7 @@
34 }
35
36 auto desktopexec = appinfo_->execLine().value();
37- auto execline = std::string(libertine_launch) + " \"" + _container.value() + "\" " + desktopexec;
38+ auto execline = std::string(libertine_launch) + " \"--id=" + _container.value() + "\" " + desktopexec;
39 retval.emplace_back(std::make_pair("APP_EXEC", execline));
40
41 /* TODO: Go multi instance */
42
43=== modified file 'libubuntu-app-launch/application-impl-snap.cpp'
44--- libubuntu-app-launch/application-impl-snap.cpp 2016-09-15 17:15:22 +0000
45+++ libubuntu-app-launch/application-impl-snap.cpp 2016-09-15 17:15:24 +0000
46@@ -418,10 +418,14 @@
47 {
48 /* If we're setting up XMir we also need the other helpers
49 that libertine is helping with */
50- /* retval.emplace_back(std::make_pair("APP_EXEC", "libertine-launch --no-container " +
51- * info_->execLine().value())); */
52- /* Not yet */
53- retval.emplace_back(std::make_pair("APP_EXEC", info_->execLine().value()));
54+ auto libertine_launch = g_getenv("UBUNTU_APP_LAUNCH_LIBERTINE_LAUNCH");
55+ if (libertine_launch == nullptr)
56+ {
57+ libertine_launch = LIBERTINE_LAUNCH;
58+ }
59+
60+ retval.emplace_back(
61+ std::make_pair("APP_EXEC", std::string(libertine_launch) + " " + info_->execLine().value()));
62 }
63 else
64 {
65
66=== modified file 'tests/exec-util-test.cc'
67--- tests/exec-util-test.cc 2016-09-15 17:15:22 +0000
68+++ tests/exec-util-test.cc 2016-09-15 17:15:24 +0000
69@@ -218,7 +218,7 @@
70 {
71 StartCheckEnv("xmir", {
72 {"APP_EXEC", [](const gchar * value) {
73- EXPECT_STREQ("xfoo", value); }},
74+ EXPECT_STREQ("libertine-launch xfoo", value); }},
75 {"APP_DESKTOP_FILE_PATH", [](const gchar * value) {
76 EXPECT_STREQ(CMAKE_SOURCE_DIR "/applications/xmir.desktop", value); }},
77 {"APP_EXEC_POLICY", [](const gchar * value) {
78@@ -300,7 +300,7 @@
79 {
80 StartCheckEnv("container-name_test_0.0", {
81 {"APP_EXEC", [](const gchar * value) {
82- EXPECT_STREQ("libertine-launch \"container-name\" test", value); }},
83+ EXPECT_STREQ("libertine-launch \"--id=container-name\" test", value); }},
84 {"APP_EXEC_POLICY", [](const gchar * value) {
85 EXPECT_STREQ("unconfined", value); }},
86 {"APP_ID", [](const gchar * value) {
87@@ -317,7 +317,7 @@
88 {
89 StartCheckEnv("container-name_user-app_0.0", {
90 {"APP_EXEC", [](const gchar * value) {
91- EXPECT_STREQ("libertine-launch \"container-name\" user-app", value); }},
92+ EXPECT_STREQ("libertine-launch \"--id=container-name\" user-app", value); }},
93 {"APP_EXEC_POLICY", [](const gchar * value) {
94 EXPECT_STREQ("unconfined", value); }},
95 {"APP_ID", [](const gchar * value) {

Subscribers

People subscribed via source and target branches