Merge lp:~aacid/media-hub/unity8_snap_is_unity into lp:media-hub

Proposed by Albert Astals Cid
Status: Merged
Merged at revision: 214
Proposed branch: lp:~aacid/media-hub/unity8_snap_is_unity
Merge into: lp:media-hub
Diff against target: 20 lines (+2/-1)
1 file modified
src/core/media/apparmor/ubuntu.cpp (+2/-1)
To merge this branch: bzr merge lp:~aacid/media-hub/unity8_snap_is_unity
Reviewer Review Type Date Requested Status
Ubuntu Phablet Team Pending
Review via email: mp+311125@code.launchpad.net

Commit message

Recognise the unity8 snap as unity

To post a comment you must log in.
Revision history for this message
Michael Terry (mterry) wrote :

I bet this works, but I think it would be better to fix the "is this appid a package" logic. Because now unity8 is a normal package and doesn't need that special-casing. And fixing that logic would let other snaps play music too.

Revision history for this message
Jim Hodapp (jhodapp) wrote :

Indeed, you are right Michael. Use this as a temporary workaround until the rework in media-hub happens.

Revision history for this message
Jim Hodapp (jhodapp) wrote :

@Albert: do you have plans to land this still or is your understanding that we'll back up and do this the right way up front?

Revision history for this message
Albert Astals Cid (aacid) wrote :

I don't know to be honest, haven't been involved in unity8-snap for a while. At some point i think this became unneeded as we didn't have media-hub on the unity8-snap anymore, but not sure if that was a workaround or not.

Revision history for this message
Michael Terry (mterry) wrote :

Indeed we dropped media-hub for the moment, until it gets more snap-aware.

So this branch itself isn't urgent. I think we still want to back up and do this the right way, but I think from the unity8 side, we're willing to wait until you media-hub folks prioritize it.

Revision history for this message
Jim Hodapp (jhodapp) wrote :

Ok, good to know. Chunsang is currently working on getting media-hub fully working for audio playback use cases under Unity8 snap session. So if we run into needing to fix this issue with this work we'll definitely prioritize doing it the right way rather than the workaround.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/core/media/apparmor/ubuntu.cpp'
2--- src/core/media/apparmor/ubuntu.cpp 2016-04-06 15:42:15 +0000
3+++ src/core/media/apparmor/ubuntu.cpp 2016-11-17 10:30:54 +0000
4@@ -74,6 +74,7 @@
5 static constexpr std::size_t index_package{1};
6 static constexpr std::size_t index_app{2};
7 static const std::string unity_name{"unity8-dash"};
8+static const std::string unity8_snap_name{"snap.unity8-session.unity8-session"};
9
10 // Returns true if the context name is a valid Ubuntu app id.
11 // If it is, out is populated with the package and app name.
12@@ -105,7 +106,7 @@
13 apparmor::ubuntu::Context::Context(const std::string& name)
14 : apparmor::Context{name},
15 unconfined_{str() == ubuntu::unconfined},
16- unity_{name == unity_name},
17+ unity_{name == unity_name || name == unity8_snap_name},
18 has_package_name_{process_context_name(str(), match_, pkg_name_)}
19 {
20 MH_DEBUG("apparmor profile name: %s", name);

Subscribers

People subscribed via source and target branches