← Back to issue list

Line overwrite causes corrupted error message

View original Github issue

Metadata

Project
craft-cli
Number
#263
Type
issue
State
closed
Author
cmatsuoka
Labels
—
Created
Updated
Closed

Current evaluation

Fixed by merged PR #210 (c62ce3a), which strips trailing spaces so brief-mode line overwrites no longer leave stale text in error messages.

Resolution: closed resolved

Reason: PR #210 was merged as commit c62ce3a. Its printer change removes trailing spaces before line breaks on supported terminals, preventing the overwrite residue reported in #263.

Evaluated by: mr-cal-bot

No scores available.

Issue body

### Bug Description During a pack operation in brief mode, the following error message is seen: ``` craft-providers error: Failed to update apt cache.e from remote ``` The actual message from apt is `craft-providers error: Failed to update apt cache.`, and `e from remote` is residue from a previous message. ### To Reproduce TBD ### part yaml _No response_ ### Relevant log output ```shell craft-providers error: Failed to update apt cache.e from remote * Command that failed: 'lxc --project snapcraft exec local:base-instance-snapcraft-buildd-base-v71--d799df4d4588b4abe861 -- env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin CRAFT_MANAGED_MODE=1 DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true DEBIAN_PRIORITY=critical apt-get update' * Command exit code: 100 * Command output: b'Ign:1 http://security.ubuntu.com/ubuntu jammy-security InRelease\nIgn:2 http://archive.ubuntu.com/ubuntu jammy InRelease\nIgn:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease\nIgn:1 http://security.ubuntu.com/ubuntu jammy-security InRelease\nIgn:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease\nIgn:1 http://security.ubuntu.com/ubuntu jammy-security InRelease\nIgn:2 http://archive.ubuntu.com/ubuntu jammy InRelease\nErr:1 http://security.ubuntu.com/ubuntu jammy-security InRelease\n Connection failed [IP: 185.125.190.82 80]\nIgn:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease\nIgn:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease\nIgn:2 http://archive.ubuntu.com/ubuntu jammy InRelease\nIgn:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease\nIgn:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease\nErr:2 http://archive.ubuntu.com/ubuntu jammy InRelease\n Connection failed [IP: 185.125.190.82 80]\nErr:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease\n Connection failed [IP: 185.125.190.82 80]\nErr:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease\n Connection failed [IP: 91.189.91.83 80]\nReading package lists...\n' * Command standard error output: b'E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/jammy/InRelease Connection failed [IP: 185.125.190.82 80]\nE: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/jammy-updates/InRelease Connection failed [IP: 185.125.190.82 80]\nE: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/jammy-backports/InRelease Connection failed [IP: 91.189.91.83 80]\nE: Failed to fetch http://security.ubuntu.com/ubuntu/dists/jammy-security/InRelease Connection failed [IP: 185.125.190.82 80]\nE: Some index files failed to download. They have been ignored, or old ones used instead.\n' ```

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Fixed by merged PR #210 (c62ce3a), which strips trailing spaces so brief-mode line overwrites no longer leave stale text in error messages.
stealth/space-bunny-alpha — closed resolved Brief-mode error lines left residue text ("e from remote") because overwritten lines weren't cleared. Fixed by merged PR #210 (commit c62ce3a), which strips trailing spaces on supported terminals; issue closed by lengau citing that PR.
stealth/space-bunny-alpha — closed resolved Fixed by merged craft-cli#210 (c62ce3a), which removes trailing spaces where supported, preventing brief-mode overwrites from leaving stale text in error messages.
stealth/space-bunny-alpha — closed resolved Fixed in canonical/craft-cli#210, merged as c62ce3a, which removes trailing spaces where supported to prevent stale text when brief-mode lines are overwritten.
stealth/space-bunny-alpha — closed resolved Fixed by merged craft-cli#210 (c62ce3a), which removes trailing spaces where supported to prevent brief-mode line overwrites from leaving stale error text.
qwen/qwen3.6-35b-a3b — — Closed as fixed by canonical/craft-cli/pull/210, which resolves the line overwrite corruption causing truncated error messages in brief mode.
qwen/qwen3.6-35b-a3b — — Closed as fixed by canonical/craft-cli#210, which resolves the line overwrite bug causing corrupted error messages in brief mode.
qwen/qwen3.6-35b-a3b — — Closed and resolved by merging canonical/craft-cli#210, which fixes the corrupted error messages caused by line overwrites in brief mode.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: canonical/craft-cli#210 (confidence 99%)

    Merged trailing-space fix identified by maintainer @lengou as resolving this corruption.

Related issues

Issue Project State Summary Similarity
#241 Missing line feed in error output craft-cli closed Closed as a duplicate of #263; its line-overwrite bug was fixed by merged PR #210 (c62ce3a) by removing trailing spaces in brief-mode output.
76%