← Back to issue list

Truncated error in hash mismatch output

View original Github issue

Metadata

Project
snapcraft
Number
#4869
Type
issue
State
open
Author
sergiusens
Labels
—
Created
Updated
Closed
—

Current evaluation

Hash-mismatch diagnostics are truncated in the concise CLI output, hiding parts of the expected and obtained digests; the full log contains both values, but the report remains unlabelled and untriaged.

Suggested action: needs triage

Reason: The full traceback shows both 64-character digests, while the CLI excerpt cuts the digest line with an ellipsis, confirming a diagnostic presentation defect. Fixing it likely involves coordinating error formatting across Craft Parts and terminal output handling in Craft CLI. The traceback is strong evidence, but the missing Snapcraft version, terminal width, labels, and maintainer follow-up leave the report untriaged.

Evaluated by: mr-cal-bot

Impact: 35 Quick Win: 13 Complexity: 48 Confidence: 88 Actionability: 70

Issue body

### Bug Description The error is truncated in the output with the important bit, the hash ### To Reproduce Run snapcraft with the provided snapcraft.yaml ### Environment N/A ### snapcraft.yaml ```shell name: darktable version: 4.8.0 adopt-info: darktable grade: stable confinement: strict base: core22 compression: lzo architectures: - build-on: amd64 - build-on: arm64 lint: ignore: - library - classic apps: darktable: command: usr/bin/darktable --datadir $SNAP/usr/share/darktable --moduledir $SNAP/usr/lib/$CRAFT_ARCH_TRIPLET/darktable --configdir $SNAP_USER_DATA --localedir $SNAP/usr/share/locale extensions: [gnome] environment: GTK_USE_PORTAL: 0 DISABLE_WAYLAND: 1 plugs: - opengl - home - removable-media - password-manager-service - network - network-bind - network-status cli: command: usr/bin/darktable-cli --datadir $SNAP/usr/share/darktable --moduledir $SNAP/usr/lib/$CRAFT_ARCH_TRIPLET/darktable --configdir $SNAP_USER_DATA --localedir $SNAP/usr/share/locale extensions: [gnome] environment: GTK_USE_PORTAL: 0 DISABLE_WAYLAND: 1 plugs: - opengl - home - removable-media - password-manager-service - network - network-bind lesfun-update-data: command: usr/bin/lensfun-update-data environment: PYTHONPATH: $SNAP/usr/lib/python3/dist-packages plugs: - network slots: session-dbus-interface: interface: dbus name: org.darktable.service bus: session layout: /usr/include/clc: bind: $SNAP/usr/include/clc /usr/lib/clc: bind: $SNAP/usr/lib/clc /usr/lib/$CRAFT_ARCH_TRIPLET/gallium-pipe: bind: $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/gallium-pipe /usr/lib/$CRAFT_ARCH_TRIPLET/intel-opencl: bind: $SNAP/usr/lib/$CRAFT_ARCH_TRIPLET/intel-opencl /usr/share/git-core/templates: bind: $SNAP/usr/share/git-core/templates build-packages: - gcc-12 - g++-12 parts: opencl: plugin: nil stage-packages: - mesa-opencl-icd - ocl-icd-libopencl1 - on amd64: - intel-opencl-icd darktable: source: https://github.com/darktable-org/darktable/releases/download/release-$SNAPCRAFT_PROJECT_VERSION/darktable-$SNAPCRAFT_PROJECT_VERSION.tar.xz source-checksum: sha256/16edc0a070293e2d3cda4ea10e49bda9bde932e23f9e62e2fa2e7ac74acf7afd plugin: cmake cmake-parameters: - -DCMAKE_BUILD_TYPE=RelWithDebInfo # Place the data alongside that coming from stage-packages (e.g. the lensfun database) - -DCMAKE_INSTALL_PREFIX=/usr # Support Lua scripts by way of internal Lua implementation - -DDONT_USE_INTERNAL_LUA=OFF # Don't overly optimize for build CPU-- stay generic - -DBINARY_PACKAGE_BUILD=ON - -DCMAKE_INCLUDE_SYSTEM_FLAG_C="isystem" - -DCMAKE_INCLUDE_SYSTEM_FLAG_CXX="isystem" - -DCMAKE_SYSTEM_PREFIX_PATH="${CRAFT_STAGE}/usr;/snap/gnome-42-2204-sdk/current/usr/;/usr" - -DCMAKE_VERBOSE_MAKEFILE=ON - -DCMAKE_CXX_FLAGS="-Wno-deprecated-register" parse-info: - usr/share/metainfo/org.darktable.darktable.appdata.xml stage-packages: - git - libasn1-8-heimdal - libavif13 - libcurl3-gnutls - libexiv2-27 - libgraphicsmagick-q16-3 - libgssapi3-heimdal - libheif1 - libhcrypto4-heimdal - libheimbase1-heimdal - libheimntlm0-heimdal - libhx509-5-heimdal - libimage-exiftool-perl - libkrb5-26-heimdal - libgphoto2-6 - libldap-2.5-0 - liblensfun-bin - liblensfun-data-v1 - liblensfun1 - libnghttp2-14 - libpugixml1v5 - libroken18-heimdal - librtmp1 - libsasl2-2 - libssh-4 - libwind0-heimdal build-packages: - intltool - libavif-dev - libexiv2-dev - libgraphicsmagick1-dev - libheif-dev - liblensfun-dev - libgphoto2-dev - libpugixml-dev - libsdl2-dev - libsm-dev - libxml2-utils - libxrandr-dev - ninja-build - patch - pkg-config - xsltproc # -- Missing jsonschema, problems in noiseprofiles.json might go unnoticed # -- GMIC not found # Disabled capabilities for now due to interfaces: # # Camera detection/tethering/importing doesn't work, with no denials. # Need to investigate further before enabling this. # - libgphoto2-dev # # Need to test with cups-control interface # - libcups2-dev # No colord interface # - libcolord-dev # - libcolord-gtk-dev # stage-packages: # - libilmbase24 # - libopenexr24 # - libpugixml1v5 build-environment: - LDFLAGS: "-L${CRAFT_STAGE}/usr/lib/${CRAFT_ARCH_TRIPLET} $(pkg-config --libs sdl2 harfbuzz gtk+-3.0 OpenEXR)" - CC: /usr/bin/gcc-12 - CXX: /usr/bin/g++-12 override-pull: | craftctl default patch -p0 < "${CRAFT_PROJECT_DIR}/snap/local/patches/darktable-math_h.patch" patch -p0 < "${CRAFT_PROJECT_DIR}/snap/local/patches/darktable-dttypes_h.patch" override-build: | craftctl default PYTHONPATH=${CRAFT_PART_INSTALL}/usr/lib/python3/dist-packages ${CRAFT_PART_INSTALL}/usr/bin/lensfun-update-data || echo No updates if [ -d /var/lib/lensfun-updates/version_1/ ]; then cp /var/lib/lensfun-updates/version_1/* ${CRAFT_PART_INSTALL}/usr/share/lensfun/version_1/ fi after: - openexr - osmgpsmap openexr: source: https://github.com/AcademySoftwareFoundation/openexr/archive/refs/tags/v3.1.3.tar.gz source-checksum: sha256/6f70a624d1321319d8269a911c4032f24950cde52e76f46e9ecbebfcb762f28c plugin: cmake cmake-parameters: - -DCMAKE_INSTALL_PREFIX=/usr - -DDOCS=OFF - -DOPENEXR_INSTALL_EXAMPLES=OFF - -DOPENEXR_BUILD_TOOLS=OFF - -DOPENEXR_INSTALL_TOOLS=OFF build-environment: - CC: /usr/bin/gcc-12 - CFLAGS: "-O3" - CXX: /usr/bin/g++-12 - CXXFLAGS: "-O3" osmgpsmap: source: https://github.com/nzjrs/osm-gps-map/releases/download/1.2.0/osm-gps-map-1.2.0.tar.gz source-checksum: sha256/ddec11449f37b5dffb4bca134d024623897c6140af1f9981a8acc512dbf6a7a5 plugin: autotools autotools-configure-parameters: - --prefix=/usr - --enable-introspection=no build-packages: - libcurl4-gnutls-dev - libssl-dev - libsoup2.4-dev build-environment: - CC: /usr/bin/gcc-12 - CFLAGS: "-O3" - CXX: /usr/bin/g++-12 - CXXFLAGS: "-O3" ``` ### Relevant log output ```shell 2024-06-21 19:41:15.813 :: 2024-06-21 19:41:14.491 Downloading '/root/parts/darktable/src/darktable-4.8.0.tar.xz' 2024-06-21 19:41:15.813 :: 2024-06-21 19:41:14.669 :: error: 2024-06-21 19:41:15.813 :: 2024-06-21 19:41:14.669 :: Traceback (most recent call last): 2024-06-21 19:41:15.813 :: 2024-06-21 19:41:14.669 :: File "/snap/snapcraft/current/lib/python3.10/site-packages/craft_parts/ctl.py", line 111, in main 2024-06-21 19:41:15.813 :: 2024-06-21 19:41:14.669 :: ret = CraftCtl.run(cmd, args) 2024-06-21 19:41:15.813 :: 2024-06-21 19:41:14.669 :: File "/snap/snapcraft/current/lib/python3.10/site-packages/craft_parts/ctl.py", line 45, in run 2024-06-21 19:41:15.813 :: 2024-06-21 19:41:14.669 :: _client(cmd, args) 2024-06-21 19:41:15.813 :: 2024-06-21 19:41:14.669 :: File "/snap/snapcraft/current/lib/python3.10/site-packages/craft_parts/ctl.py", line 98, in _client 2024-06-21 19:41:15.813 :: 2024-06-21 19:41:14.669 :: raise RuntimeError(message) 2024-06-21 19:41:15.813 :: 2024-06-21 19:41:14.670 :: RuntimeError: Expected digest 16edc0a070293e2d3cda4ea10e49bda9bde932e23f9e62e2fa2e7ac74acf7afd, obtained 419849e9015270e4075f2341c6b5532d3d1cccccfa8f19592cb2ea3ad17f9255. ``` ### Additional context In CLI ``` 'override-pull' in part 'darktable' failed with code 1.c0a070293e2d3cda4ea10e49bda9bde932e23f9e62e2fa2e7ac74acf7afd, obtained 419849e9015270e4075f2341c6b5532d3d1ccccc… Review the scriptlet and make sure it's correct. ```

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 35
Quick Win: 13
Complexity: 48
Confidence: 88
Actionability: 70
needs triage Hash-mismatch diagnostics are truncated in the concise CLI output, hiding parts of the expected and obtained digests; the full log contains both values, but the report remains unlabelled and untriaged.
stealth/space-bunny-alpha
Impact: 30
Quick Win: 14
Complexity: 42
Confidence: 85
Actionability: 82
needs triage Hash mismatch diagnostics are reproducible, but the concise CLI error ellipsizes the stderr line and omits key checksum context; no triage or follow-up is recorded.
qwen/qwen3.6-35b-a3b
Impact: 30
Quick Win: 19
Complexity: 20
Confidence: 70
Actionability: 80
needs triage Hash mismatch error output is truncated in CLI, hiding critical hash values needed for debugging source integrity failures.
qwen/qwen3.8-27b
Impact: 35
Quick Win: 24
Staleness: 75
Complexity: 30
Confidence: 55
Support Request: 0
needs triage Snapcraft CLI truncates the source-checksum mismatch error message with an ellipsis, hiding the obtained hash. Reported by maintainer sergiusens 801 days ago with no comments, labels, or follow-up activity.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 20
Confidence: 85
Support Request: 10
close stale Reports a truncated hash mismatch error message in snapcraft CLI output. Issue has been inactive for over 760 days with no maintainer response or labels.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 15
Confidence: 85
Support Request: 5
needs triage Reports truncated hash mismatch error messages in snapcraft CLI output. Open for ~2 years with no maintainer response, labels, or comments. Needs triage.

Update history

No update history recorded yet.

Related work

  • Related To: canonical/craft-parts#897 (confidence 55%)

    Craft Parts PR #897 split stderr for better error presentation, but no explicit connection to this truncation was established.

Related issues

No related issues found above the similarity threshold.