Package resolution issue results in backtrace
Metadata
Current evaluation
Resolved by snapcraft PR #1647, merged as commit 71f48bdc9 and released in Snapcraft 2.35, surfacing apt errors instead of an unhelpful backtrace.
Resolution: closed resolved
Reason: Maintainer kalikiana confirmed that PR #1647 implemented the change and that it shipped in Snapcraft 2.35.
Evaluated by: mr-cal-bot
No scores available.
Issue body
Apparently I have made some mistake in my build packages, but it's impossible to figure out what, because all I get from snapcraft is a backtrace, and not the actual output of apt. Can we switch things around, so I get the output from the tools by default, and only a backtrace if desired, because in general the back trace from snapcraft is completely useless to me as a packager of software.
core 16-2.28.1+git403.ee10772 from 'canonical' installed
Looking up assertion ['account-key', 'public-key-sha3-384=BWDEoaqyr25nF5SNCvEv2v7QnM9QsfCc0PBMYD_i2NGSQ32EF2d4D0hqUel3m8ul']
Looking up assertion ['snap-declaration', 'snap-name=snapcraft']
Looking up assertion ['snap-revision', 'snap-revision=601', 'snap-id=vMTKRaLjnOJQetI78HjntT37VuoyssFE']
Adding assertion snapcraft_601.assert
Installing /run/snapcraft_601.snap
snapcraft 2.34+git46.0faf6dc from 'canonical' installed
"grade" property not specified: defaulting to "stable"
Traceback (most recent call last):
File "/snap/snapcraft/601/bin/snapcraft", line 11, in <module>
load_entry_point('snapcraft==2.34', 'console_scripts', 'snapcraft')()
File "/snap/snapcraft/601/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 565, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/snap/snapcraft/601/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2631, in load_entry_point
return ep.load()
File "/snap/snapcraft/601/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2291, in load
return self.resolve()
File "/snap/snapcraft/601/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2297, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/snap/snapcraft/601/lib/python3.6/site-packages/snapcraft/cli/__main__.py", line 19, in <module>
run(prog_name='snapcraft')
File "/snap/snapcraft/601/lib/python3.6/site-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/snap/snapcraft/601/lib/python3.6/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/snap/snapcraft/601/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/snap/snapcraft/601/lib/python3.6/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/snap/snapcraft/601/lib/python3.6/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/snap/snapcraft/601/lib/python3.6/site-packages/snapcraft/cli/lifecycle.py", line 138, in snap
project_options, directory=directory, output=output)
File "/snap/snapcraft/601/lib/python3.6/site-packages/snapcraft/internal/lifecycle.py", line 354, in snap
execute('prime', project_options)
File "/snap/snapcraft/601/lib/python3.6/site-packages/snapcraft/internal/lifecycle.py", line 115, in execute
config.build_tools)
File "/snap/snapcraft/601/lib/python3.6/site-packages/snapcraft/internal/repo/_deb.py", line 197, in install_build_packages
cls._mark_install(apt_cache, package_names)
File "/snap/snapcraft/601/lib/python3.6/site-packages/snapcraft/internal/repo/_deb.py", line 222, in _mark_install
apt_cache[name_arch].mark_install()
File "/snap/snapcraft/601/lib/python3.6/site-packages/apt/package.py", line 1309, in mark_install
fixer.resolve(True)
SystemError: E:Unable to correct problems, you have held broken packages.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Resolved by snapcraft PR #1647, merged as commit 71f48bdc9 and released in Snapcraft 2.35, surfacing apt errors instead of an unhelpful backtrace. | |
| stealth/space-bunny-alpha | — | closed resolved | Snapcraft improved tool-error output without a default backtrace; PR #1647 (71f48bdc9) merged and shipped in Snapcraft 2.35. | |
| stealth/space-bunny-alpha | — | closed resolved | Package-resolution diagnostics were reworked in PR #332 (commit 580c43ebc), adding a --debug flag to enable backtraces and debug logs instead of showing a backtrace by default. | |
| qwen/qwen3.6-35b-a3b | — | — | Abandoned. The request to default snapcraft error output to tool logs instead of Python backtraces was closed without comments or resolution. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without comments or explicit resolution. The request to display apt output instead of Python tracebacks for package resolution failures was likely abandoned or superseded by later snapcraft updates. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without action, likely abandoned or superseded by newer snapcraft versions. The request to replace Python backtraces with actual apt output on package resolution failures was not implemented. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed without resolution. The request to default to apt output over Python tracebacks for package resolution errors was abandoned. Error handling defaults were later improved in subsequent releases. |
Update history
| Date | Change |
|---|---|
| created |
Related work
-
Likely Fixed By:
snapcraft#1647
(confidence 100%)
The PR improved error surfacing for the package-resolution failure.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1497453 snapcraft fails if it needs to pull a deb that has an uninstallable version on the system | snapcraft (launchpad) | closed | Resolved in release preparation: changelog commit c1a44492b records LP #1497453 as fixed for Snapcraft’s failing deb-fetch handling. |