Merge ~osomon/oxide:fix-app-pkgname into oxide:master

Proposed by Olivier Tilloy
Status: Merged
Merged at revision: 1f2a33e3568ddae0cd24c0386e76d5a2830fc66c
Proposed branch: ~osomon/oxide:fix-app-pkgname
Merge into: oxide:master
Diff against target: 20 lines (+6/-2)
1 file modified
shared/browser/oxide_browser_process_main.cc (+6/-2)
Reviewer Review Type Date Requested Status
Chris Coulson Approve
Review via email: mp+303821@code.launchpad.net

Commit message

Use the APP_ID environment variable instead of APP_PKGNAME.

APP_PKGNAME is not an environment variable that is being set anywhere for click apps.
Fixes: https://launchpad.net/bugs/1260103.

To post a comment you must log in.
Revision history for this message
Chris Coulson (chrisccoulson) wrote :

Thanks, it basically looks ok (there's a couple of minor comments)

review: Approve
Revision history for this message
Olivier Tilloy (osomon) wrote :

See my replies inline.

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

Thanks, I've left a reply

~osomon/oxide:fix-app-pkgname updated
52397b8... by Olivier Tilloy

Review tweaks.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/shared/browser/oxide_browser_process_main.cc b/shared/browser/oxide_browser_process_main.cc
2index 57e7cff..c205f32 100644
3--- a/shared/browser/oxide_browser_process_main.cc
4+++ b/shared/browser/oxide_browser_process_main.cc
5@@ -242,9 +242,13 @@ base::FilePath GetSharedMemoryPath(base::Environment* env) {
6 }
7
8 // click packages
9+ // Ref: https://developer.ubuntu.com/en/phone/platform/guides/app-confinement/#Runtime_Environment
10 std::string app_pkgname;
11- if (env->GetVar("APP_PKGNAME", &app_pkgname)) {
12- return base::FilePath(std::string("/dev/shm/") + app_pkgname + ".oxide");
13+ if (env->GetVar("APP_ID", &app_pkgname)) {
14+ app_pkgname = app_pkgname.substr(0, app_pkgname.find("_"));
15+ if (!app_pkgname.empty()) {
16+ return base::FilePath(std::string("/dev/shm/") + app_pkgname + ".oxide");
17+ }
18 }
19
20 // default

Subscribers

People subscribed via source and target branches