Add snap type filtering support for store queries

Bug #1443537 reported by Sergio Schvezov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Software Center Agent
Fix Released
Undecided
Natalia Bidart

Bug Description

There are 5 snap types (2 are unimplemented) that are part of package.yaml; currently these are supported:
- app
- framework
- oem

and they live under the 'type' entry of package.yaml with a rule that if 'type' is omitted it is implicitly an 'app'.

Complete documentation of what I summarized here can be found on http://bazaar.launchpad.net/~snappy-dev/snappy/snappy/view/head:/docs/meta.md

fwiw, the type entry in package.yaml is translated into the legacy click manifest.

It would be great if we could somehow request to just return results for the types

Revision history for this message
Martin Albisetti (beuno) wrote :

Additionally, "oem" type should ideally not show up in search results, but can be accessed directly.

Changed in software-center-agent:
assignee: nobody → Natalia Bidart (nataliabidart)
status: New → In Progress
Revision history for this message
Natalia Bidart (nataliabidart) wrote :

Sergio, can you please provide a test snap for each type?

Also, a few notes:

1- The store allows for packages to have more than one type inside, mainly because clicks can have a mix of applications and scopes. So this attribute will end up being a list in the index. I would suggest renaming the "type" to "types" inside the snap, so is more clear, but of course this is not an issue in the store. The store just need to know the proper key to search for in the manifest.

2- The store already handles types "scope" and "application", so it would be ideal if the type in snaps will be "application" instead of "app". If you can not change that, we can have a workaround in the store mapping "app" to "application", but notice that the index will always show application for that type.

Revision history for this message
Sergio Schvezov (sergiusens) wrote :

Maybe the type here we initially thought of similar is indeed not the same, since personally I consider "scope" and "application" from the click world to be more like capabilties whereas these types I speak of can only be one.

Type: app could be application if we rewrite all the documentation to consider this, but given the previous statement maybe it doesn't matter anymore.

Revision history for this message
Sergio Schvezov (sergiusens) wrote :

Additionally, beuno says, 15.04 is already out so we can't make this a list in the packaging, it would need to be handled store side.

Changed in software-center-agent:
status: In Progress → Fix Committed
Revision history for this message
Natalia Bidart (nataliabidart) wrote :

Hello Sergio,

Thanks for the reply. Is worth noting that the store already handles that the "type" in the snap manifest is not a list, but a single string. It also allows for it not to be defined, as requested.

Regarding your first comment, I think the type from clicks and the type for snaps are describing the same thing, conceptually. It indicates what type of content the package has. Click packages can have one or more types inside, as I assume snaps can as well. I understand that the common usage for snaps is to provide only one type, which is fine, it will work smoothly.

So, summarizing:

* the landed code handles that 'type' as a single string
* the content attribute in the CPI results will be a list, with possible types:

application
scope
oem
framework

The store will also map, internally as a workaround, app to application, but it would be ideal if snap will also use application across the doc and implementation to be consistent.

Changed in software-center-agent:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.