← Back to issue list

'snap info' does not handle versions that end in 0 well

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1669291
Type
issue
State
closed
Author
~mvo
Labels
—
Created
Updated
Closed

Current evaluation

Closed as a YAML/configuration caveat: unquoted 2.10 is parsed numerically, while snapd had resilient parsing covered by snapcore/snapd#4437. Quoting the version preserves it.

Resolution: closed not a bug

Reason: Maintainers confirmed that unquoted 2.10 is interpreted as a number and recommended quoting it; snapd already parsed versions resiliently, with regression coverage explicitly linked as snapcore/snapd#4437. No Snapcraft parser change was required.

Evaluated by: mr-cal-bot

No scores available.

Issue body

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.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed not a bug Closed as a YAML/configuration caveat: unquoted 2.10 is parsed numerically, while snapd had resilient parsing covered by snapcore/snapd#4437. Quoting the version preserves it.
stealth/space-bunny-alpha — closed not a bug Closed as a Snapcraft YAML problem: unquoted version 2.10 became 2.1, while snapd already parsed numeric-looking versions safely; snapcore/snapd#4437 added regression coverage.
stealth/space-bunny-alpha — closed stale Closed without a documented fix after snap info rendered LXD 2.10 as 2.1; the version-parsing report was left unresolved.
qwen/qwen3.6-35b-a3b — — Closed without comment, likely abandoned, after reporting a bug where snap info parsed version strings as numbers, incorrectly dropping trailing zeros (e.g., 2.10 displayed as 2.1).
qwen/qwen3.6-35b-a3b — — Abandoned and closed without a linked pull request or public resolution. The report identified that snap info incorrectly strips trailing zeros from version numbers by parsing them as floats.
qwen/qwen3.6-35b-a3b — — A bug report noting snap info drops trailing zeros in version numbers (e.g., 2.10 shown as 2.1) was closed without resolution. Zero comments and years of inactivity confirm the report was abandoned.
qwen3.6-35b-a3b-mtp-q6 — — Closed without documented resolution. The report identified that snap info incorrectly truncated trailing zeros in version numbers by parsing them as floats instead of strings.

Update history

Date Change
created

Related work

  • Related To: snapd#4437 (confidence 98%)

    Explicitly linked regression coverage for snapd parsing version-like YAML values as strings.

Related issues

Issue Project State Summary Similarity
#1813925 "version: 0.2" returns confusing error message (trunk) snapcraft (launchpad) open Unquoted YAML numeric versions such as 2.11 are parsed as floats and rejected with a misleading snap-version error; quoting works, but compatibility or clearer messaging remains unaddressed.
75%