Skip to content

arcup: verify_checksum_file incorrectly treats valid checksum files without trailing newline as empty #518

Closed

Description

@CuriQusEth

verify_checksum_file in arcup currently decides whether a checksum file is empty based on the exit status of the read command.

On bash, read returns non-zero at EOF even when it successfully reads a line that has no trailing newline. As a result, a perfectly valid single-line checksum file is rejected with the message "Checksum file is empty".

There is also a secondary issue: if the checksum file does not exist or is unreadable, the redirection error is shown to the user and then set -u causes an unbound variable error.

Steps to Reproduce

# Create a valid checksum file without trailing newline
printf 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855  empty' > checksum.sha256

# Run the verification (current behavior fails)
./arcup verify ...   # or the relevant command that calls verify_checksum_file

Activity

  1. CuriQusEth commented on Nov 15, 2026

    @CuriQusEth
    Author

    Note: This appears to be related to / a clearer restatement of #420.
    Happy to work on a fix if either this issue or #420 is assigned to me.

  2. CuriQusEth commented on Nov 15, 2026

    @CuriQusEth
    Author

    Closing in favor of #420 (same issue, reported earlier).
    Sorry for the duplicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions