touch-packages team mailing list archive
-
touch-packages team
-
Mailing list archive
-
Message #84693
Re: [Bug 1465675] Re: API needed to determine if App ID is a scope
On Tue, 2015-06-16 at 23:50 +0000, Michi Henning wrote:
> We currently don't have any concept of an app ID in the scopes run time,
> except for one place, where we check whether a scope ID looks like
> <scope_id>_<app_id>. That's the case for scopes that are bundled with an
> app into the same click.
>
> Is this what you mean?
Well AppID is a concept in Click and the system more than scopes. It is
the name of the package and the hook ID. It is, for instance, what the
name of the apparmor profiles are. But, yes, the same thing.
$(package)_$(hookname)_$(version)
For instance, you can get this value if someone talks to you and you ask
AppArmor what profile the connector is using.
> The easiest way to implement this would be to write a little scopes
> client that gets the list of scopes from the registry and then iterates
> over the scope ID to check whether there is a scope with an ID that
> looks like <some-string>_<app_id>.
At some level, I don't really care about the implementation, but in
other situations I've found just checking to see if a file exists in a
cache'd path is fast any easy to implement things like this. For
instance:
if [ -e ~/.local/share/unity-scopes/$(appid) ||
-e /usr/lib/*/unity-scopes/$(appid) ]
Would probably work well enough.
--
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to unity-scopes-api in
Ubuntu.
https://bugs.launchpad.net/bugs/1465675
Title:
API needed to determine if App ID is a scope
Status in unity-scopes-api package in Ubuntu:
New
Bug description:
There are a few cases where we'd like it if a higher level service could determine if a particular AppID is connected to a scope. This mostly deals with requests that relate to trusted session prompts as they need to be overlayed on top of the dash instead of the calling process. Another is so that URL dispatcher can return better errors on the scope:// URL namespace. I don't think that it needs to be complex, roughly something like this:
bool isScope (const char * appid);
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/unity-scopes-api/+bug/1465675/+subscriptions
References