Version 2.10 is converted to 2.1

Bug #1586988 reported by Didier Roche-Tolomelli
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
snapcraft (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Setting an snap with version: 2.10 is converted implicitely to a numeric value and set to 2.1 (as in hello_2.1_amd64.snap) for instance.

We need to treat the version always as a string.

Note that snap/meta/snap.yaml is already converted to 2.1.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in snapcraft (Ubuntu):
status: New → Confirmed
Revision history for this message
Colin Watson (cjwatson) wrote :

I don't think snapcraft can just "treat the version always as a string" without departing from (unfortunate) YAML syntax:

  >>> import yaml
  >>> yaml.safe_load('version: 2.10')
  {'version': 2.1}
  >>> yaml.safe_load('version: "2.10"')
  {'version': '2.10'}

Perhaps the right answer is to go through documentation and make sure that the examples for version: always make it be an explicit string?

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

This was fix on 3.x

Changed in snapcraft (Ubuntu):
status: Confirmed → 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.