'snap info' does not handle versions that end in 0 well
Bug #1669291 reported by
Mark Shuttleworth
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snapcraft |
Fix Released
|
Undecided
|
Unassigned | ||
snapd |
Fix Released
|
Medium
|
Unassigned |
Bug Description
LXD 2.10 is just released but 'snap info' presents this as 2.1:
$ snap info lxd
name: lxd
summary: "LXD - the container lightervisor"
publisher: canonical
description: |
LXD is a container manager for system containers.[...]
commands:
- lxd
- lxd.benchmark
- lxd.lxc (lxc)
tracking: stable
installed: 2.8 (976) 12MB -
refreshed: 2017-01-25 04:47:15 +0100 CET
channels:
stable: 2.8 (976) 12MB -
candidate: 2.1 (1416) 12MB -
beta: 2.1 (1416) 12MB -
edge: git-e177ca9 (1435) 12MB -
We should make sure we are not parsing versions as numbers and silently dropping trailing post-decimal-point zeroes.
description: | updated |
Changed in snapcraft: | |
status: | New → Fix Released |
To post a comment you must log in.
I downloaded lxd r1416 and unpacked it and it already has the invalid version:
"""
$ grep version: meta/snap.yaml
version: 2.1
"""
I (strongly) suspect that snapcraft truncated it. I had the same when doing "version: 2.10" in the regression test for snapd that I wrote in https:/ /github. com/snapcore/ snapd/pull/ 4437 to ensure that its not our bug.
Adding a snapcraft task, maybe they can at least warn that versions should be quoted:
version: 2.10 (will be truncated)
vs
version: "2.10" (is fine)
However when I created a test snap and used "version: 2.10" snapcraft was generating the truncated version number 2.1.