← Back to issue list

7.3.1 Error: No such option: --verbosity (Possible options: --verbose, --version)

View original Launchpad issue

Metadata

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

Current evaluation

Legacy (core20) code path rejected --verbosity/--verbose/--quiet. Fixed via canonical/snapcraft#5423: PR #5646 (commit 3aeded2fa) plus follow-up PR #5680 (4a7663069), shipped in Snapcraft 8.11/8.11.1; snapcraft_legacy later removed entirely.

Resolution: closed resolved

Reason: mr-cal closed the issue on 2025-08-07 noting the fix landed in canonical/snapcraft#5423, implemented by merged PR #5646 (commit 3aeded2fa) and follow-up PR #5680 (commit 4a7663069), released in Snapcraft 8.11. Legacy support has since been removed altogether by commit ffb164b7a (chore: remove snapcraft_legacy) after core20 support was dropped in #6019.

Evaluated by: mr-cal-bot

No scores available.

Issue body

Snapcraft help shows verbosity option $ snapcraft -h ... --verbosity: Set the verbosity level to 'quiet', 'brief', 'verbose', 'debug' or 'trace' The option works but fails when legacy implementation is run. To reproduce, run the `snapcraft --verbosity trace` on snaps that are not core-22. $ snapcraft --verbosity trace 2023-04-17 17:36:58.423 Starting Snapcraft 7.3.1 2023-04-17 17:36:58.423 Logging execution to '/home/anatoli/.local/state/snapcraft/log/snapcraft-20230417-173658.421936.log' 2023-04-17 17:36:58.423 Raw pre-parsed sysargs: args={'help': False, 'verbose': False, 'quiet': False, 'verbosity': 'trace', 'version': False, 'trace': False} filtered=[] 2023-04-17 17:36:58.423 Using default command: 'pack' 2023-04-17 17:36:58.423 General parsed sysargs: command='pack' args=[] 2023-04-17 17:36:58.424 Command parsed sysargs: Namespace(bind_ssh=False, build_for=None, debug=False, destructive_mode=False, directory=None, enable_developer_debug=False, enable_experimental_extensions=False, enable_experimental_target_arch=False, enable_experimental_ua_services=False, enable_manifest=False, http_proxy=None, https_proxy=None, manifest_image_information=None, output=None, provider=None, target_arch=None, ua_token=None, use_lxd=False) 2023-04-17 17:36:58.425 lifecycle command: 'pack', arguments: Namespace(bind_ssh=False, build_for=None, debug=False, destructive_mode=False, directory=None, enable_developer_debug=False, enable_experimental_extensions=False, enable_experimental_target_arch=False, enable_experimental_ua_services=False, enable_manifest=False, http_proxy=None, https_proxy=None, manifest_image_information=None, output=None, provider=None, target_arch=None, ua_token=None, use_lxd=False) 2023-04-17 17:36:58.425 command: pack, arguments: Namespace(bind_ssh=False, build_for=None, debug=False, destructive_mode=False, directory=None, enable_developer_debug=False, enable_experimental_extensions=False, enable_experimental_target_arch=False, enable_experimental_ua_services=False, enable_manifest=False, http_proxy=None, https_proxy=None, manifest_image_information=None, output=None, provider=None, target_arch=None, ua_token=None, use_lxd=False) 2023-04-17 17:36:58.430 run legacy implementation: base is not core22 Usage: snapcraft [OPTIONS] COMMAND [ARGS]... Try 'snapcraft -h' for help. Error: No such option: --verbosity (Possible options: --verbose, --version) This is the line that produces the message https://github.com/snapcore/snapcraft/blob/d8d4ce07716f72f10c67006ee47339893ebf983e/snapcraft/legacy_cli.py#L44 It looks like the arguments are not explicitly passed to legacy CLI, and `click` in legacy uses the same global `sys.argv`, which contains newer options. The solution could be to whitelist only supported options and transform `--verbosity trace|debug` into `enable_developer_debug` option for legacy code. https://github.com/snapcore/snapcraft/blob/d8d4ce07716f72f10c67006ee47339893ebf983e/snapcraft_legacy/cli/_runner.py#L95

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Legacy (core20) code path rejected --verbosity/--verbose/--quiet. Fixed via canonical/snapcraft#5423: PR #5646 (commit 3aeded2fa) plus follow-up PR #5680 (4a7663069), shipped in Snapcraft 8.11/8.11.1; snapcraft_legacy later removed entirely.
stealth/space-bunny-alpha — closed resolved Legacy commands now accept modern verbosity flags. Fixed by canonical/snapcraft#5646 (3aeded2fa), expanded by #5680 (4a7663069), and released in Snapcraft 8.11.
stealth/space-bunny-alpha — closed resolved Fixed in canonical/snapcraft#5646 (3aeded2fa), adding verbosity support to legacy commands; follow-up #5680 extended it to non-lifecycle commands.
qwen/qwen3.6-35b-a3b — — Closed without resolution. Proposed fix filters legacy CLI arguments to prevent unrecognized modern flags from passing through sys.argv, mapping --verbosity to the legacy enable_developer_debug option.
qwen/qwen3.6-35b-a3b — — Closed. Fixed by filtering legacy CLI arguments and mapping --verbosity to enable_developer_debug for non-core22 bases.
qwen/qwen3.6-35b-a3b — — Abandoned. The legacy CLI failure when passing --verbosity was not addressed here. Resolution requires filtering unsupported flags or mapping verbosity to debug options before invoking legacy code.
qwen3.6-35b-a3b-mtp-q6 — — Closed without resolution. The --verbosity flag caused errors in the legacy CLI for non-core-22 snaps, but no fix was implemented.

Update history

Date Change
created

Related work

  • Likely Fixed By: canonical/snapcraft#5423 (confidence 97%)

    Tracked issue for adding --verbosity/--verbose/--quiet to legacy commands; cited by the closing maintainer comment as the resolution.

  • Likely Fixed By: canonical/snapcraft#5646 (confidence 95%)

    Merged PR (commit 3aeded2fa) making snapcraft_legacy core20 commands accept craft-cli verbosity args, with --enable-developer-debug as an alias for --verbosity=debug.

  • Related To: canonical/snapcraft#5680 (confidence 88%)

    Follow-up merged PR (commit 4a7663069) extending verbosity support to non-lifecycle legacy commands, shipped in 8.11.1.

  • Superseded By: canonical/snapcraft#5424 (confidence 60%)

    Snapcraft 7 counterpart closed 2025-08-07 as shipped in 8.11 via #5423 and not planned for the 7.x series.

  • Related To: snapcraft#4194 (confidence 50%)

    Larger legacy-CLI effort cited by mr-cal in 2023 as the planned home for this fix; work was later split into #5423/#5424.

Related issues

Issue Project State Summary Similarity
#5424 Add `--verbosity`, `--verbose`, and `--quiet` for legacy commands in Snapcraft 7 snapcraft closed Enhancement request for --verbosity/--verbose/--quiet on legacy commands in Snapcraft 7. Maintainer closed it 2025-08-07 noting it shipped in Snapcraft 8.11 via #5423 (PR #5646, commit 3aeded2fa) and is not planned for Snapcraft 7.
80%
#5423 Add `--verbosity`, `--verbose`, and `--quiet` for legacy commands in Snapcraft 8 snapcraft closed Legacy command verbosity support merged in PR #5646 (3aeded2fa), with non-lifecycle coverage completed by PR #5680 (4a7663069).
79%
#1980686 snapcraft build won't allow `verbose` flag snapcraft (launchpad) closed Snapcraft 7.0.11 fixed core22 only; canonical/snapcraft#4024 (be005b98d) later forwarded -v and --verbose to snapcraft_legacy for core18/core20 builds.
77%
#1980515 Snapcraft 7 inconsistent CLI options handling snapcraft (launchpad) closed Snapcraft 7's inconsistent --verbose handling was fixed by snapcore/snapcraft#4024 (commit be005b98d); a maintainer confirmed it was resolved in Snapcraft 7.3.
77%
#5680 feat(snapcraft_legacy): support verbosity args in non-lifecycle commands snapcraft merged Merged in PR #5680 (commit 4a7663069), adding verbosity handling to snapcraft_legacy non-lifecycle commands and fixing #5298; released in Snapcraft 8.11.1.
75%
#1986643 "snapcraft extension" both does and does not accept "--verbose" snapcraft (launchpad) closed Reported inconsistent handling of --verbose: verbose logging started, then the CLI errored with 'No such option'. Fixed by snapcore/snapcraft#4024 (commit be005b98d) forwarding --verbose/-v to snapcraft_legacy, shipped in snapcraft 7.3; tracked as CRAFT-1292.
74%
#4024 cli: pass `--verbose` and `-v` to snapcraft_legacy snapcraft merged Merged #4024 (commit be005b98d) to forward --verbose and -v to snapcraft_legacy for core18/core20 builds, implementing CRAFT-1292.
72%
#5658 Make `quiet` verbosity print nothing in snapcraft _legacy snapcraft closed Enhancement to silence remaining core20/legacy quiet-mode output was closed as won't fix by maintainer mr-cal, since Snapcraft 9 removes snapcraft_legacy; the legacy package was later deleted in PR #6241 (ffb164b7a, 995f0a3bc).
72%
#4647 Setting verbosity via environment variable no longer works on 8.0.4.post33+git61228836 snapcraft closed SNAPCRAFT_VERBOSITY_LEVEL stopped working after the craft-application migration; fixed in snapcraft PR #4699 (commit 283d44301 / merge 2fd361741) by mapping it to CRAFT_VERBOSITY_LEVEL. Reporter confirmed the fix.
71%