package title is used instead of package name when returning search results

Bug #1494855 reported by Ricardo Kirkner
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snappy
Fix Released
Undecided
Unassigned

Bug Description

When trying to install the lxd package, I get the following failure

(RaspberryPi2)ubuntu@localhost:~$ sudo snappy install lxd
Installing lxd
lxd failed to install: snappy package not found
(RaspberryPi2)ubuntu@localhost:~$ sudo snappy search lxd
Name Version Summary
lxd 0.15-2 lxd
(RaspberryPi2)ubuntu@localhost:~$

If instead I use full package name, I can successfully install the package

(RaspberryPi2)ubuntu@localhost:~$ sudo snappy install lxd.stgraber
Installing lxd.stgraber
Starting download of lxd.stgraber
19.70 MB / 19.70 MB [====================================] 100.00 % 141.14 KB/s
Done

Checking the package data it looks like the package doesn't have an alias set, so I think snappy should return the package name as lxd.stgraber and not as lxd in search results. From the returned data it would seem snappy is using the title field instead of the name field, which would produce more accurate results.

$ curl -X GET \
    --url "https://search.apps.ubuntu.com/api/v1/search" \
    --header "Accept: application/hal+json" \
    --header "X-Ubuntu-Architecture: armhf" \
    --header "X-Ubuntu-Device-Channel: stable" \
    --header "X-Ubuntu-Store: ubuntu"

produces

{
    "_embedded": {
        "clickindex:package": [
            {
                "_links": {
                    "self": {
                        "href": "https://search.apps.ubuntu.com/api/v1/package/lxd.stgraber"
                    }
                },
                "alias": null,
                "content": "framework",
                "icon_url": "https://myapps.developer.ubuntu.com/site_media/appmedia/2015/08/lxd.png",
                "name": "lxd.stgraber",
                "price": 0.0,
                "prices": {},
                "publisher": "Canonical Ltd.",
                "ratings_average": 0.0,
                "release": [
                    "rolling-personal",
                    "rolling-core",
                    "15.04-core"
                ],
                "revision": 3,
                "title": "lxd",
                "version": "0.15-2"
            }
        ]
    },
    "_links": {
        "curies": [
            {
                "href": "https://wiki.ubuntu.com/AppStore/Interfaces/ClickPackageIndex#reltype_{rel}",
                "name": "clickindex",
                "templated": true
            }
        ],
        "self": {
            "href": "https://search.apps.ubuntu.com/api/v1/search?fields=&q=lxd"
        }
    }
}

description: updated
Revision history for this message
Michael Vogt (mvo) wrote :

This is fixed in snappy 16 - all snaps in the store can be installed via the short name now.

Changed in snappy:
status: New → 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.