default for snap download is global store (not brand store)

Bug #1800473 reported by Ian Johnson
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapd
New
Undecided
Unassigned

Bug Description

The default store ID for `snap install` is that of the model, which makes sense as it allows installation from the brand store for a device.

However the default store ID for `snap download` is the global store, which is inconsistent with `snap install` and seems wrong. I think that the _default_ store ID for all operations on a device with a model and a brand store should be the brand store's store ID.

For example to download a snap from the device's brand store, one would have to either have to know their brand store ID, or would have to do something like

```
UBUNTU_STORE_ID="$(snap known model | grep 'store: ' | awk '{print $2}')"
snap download brand-store-specific-snap
```

which is not obvious and a not so great user experience.

Note that this bug is simply about the default, obviously with the default brand store ID changed to the device's a user could still download any snap from the global store using

```
UBUNTU_STORE_ID="" snap download global-store-specific-snap
```

For a user on a device with a model and a brand store the more common use case would probably be to download snaps from their brand store, hence why it should be the default.

Revision history for this message
Daniel Manrique (roadmr) wrote :

Should this be reported against snapd instead?

https://bugs.launchpad.net/snapd/

The Snap Store honors the store requested by snapd via the model and serial assertion data (or forced via the UBUNTU_STORE_ID hack); if that's not being honored/sent for a snap download operation, there's not much the Snap Store can do, I think.

Changed in snapstore:
status: New → Invalid
Revision history for this message
Ian Johnson (anonymouse67) wrote :

I was told that the decision to make snap download use the global store was a design decision by the store team, hence the bug here rather than snapd, but yes you are correct in that the offending code is actually in snapd.

affects: snapstore → snapd
Changed in snapd:
status: Invalid → New
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.