← Back to team overview

ubuntu-phone team mailing list archive

Re: How to find current framework version (for the click scope, not an app)

 

Done, thanks: https://bugs.launchpad.net/ubuntu/+source/click/+bug/1271633


On Wed, Jan 22, 2014 at 5:26 AM, Colin Watson <cjwatson@xxxxxxxxxx> wrote:

> On Wed, Jan 08, 2014 at 01:38:57PM -0600, Jamie Strandboge wrote:
> > On 01/08/2014 12:42 PM, Mike McCracken wrote:
> > > The click scope currently has a hard-coded string
> "framework:ubuntu-sdk-13.10"
> > > which it uses to query the click store for apps to display.
> > >
> > > It seems like we should be getting that from somewhere else.
> > > Is there an authoritative place to get the name of the currently
> installed
> > > framework?
> > >
> >
> > This is a great question. The available frameworks are in the
> > /usr/share/click/frameworks directory, but it seems that you should use
> the
> > click API or call out to (the nonexistent) 'click frameworks' (or
> similar)
> > command. CC'ing Colin for input.
>
> Please file a bug on the Ubuntu click package about this so that I don't
> forget.  I think it would be best to add an API for this as part of the
> libclick work.  In the meantime the following Python code or equivalent
> should be safe (although please include a reference to any packages
> where you've open-coded this in your bug report on click):
>
>   def installed_frameworks():
>       ext = ".framework"
>       for name in os.listdir("/usr/share/click/frameworks"):
>           if name.endswith(ext):
>               yield name[:-len(ext)]
>
> --
> Colin Watson                                       [cjwatson@xxxxxxxxxx]
>
> --
> Mailing list: https://launchpad.net/~ubuntu-phone
> Post to     : ubuntu-phone@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~ubuntu-phone
> More help   : https://help.launchpad.net/ListHelp
>

References