Skip to content

debdiff source fails if diff isn't valid UTF-8

I got this while preparing the grep 3.12/experimental update, on debusine.debusine.net:

Task: https://debusine.debian.net/debian/developers/work-request/178105/ Error:

Exception type: UnicodeDecodeError
Message: 'utf-8' codec can't decode byte 0xeb in position 7548889: invalid continuation byte

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/debusine/tasks/_task.py", line 884, in _execute
    execution_succeeded = self.run(execute_directory)
  File "/usr/lib/python3/dist-packages/debusine/tasks/_task.py", line 1288, in run
    returncode = self.run_cmd(
        cmd,
    ...<3 lines>...
        capture_stdout_filename=self.CAPTURE_OUTPUT_FILENAME,
    )
  File "/usr/lib/python3/dist-packages/debusine/tasks/_task.py", line 1403, in run_cmd
    self._write_utf8(cmd_log, capture_stdout.read_text())
                              ~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/lib/python3.13/pathlib/_local.py", line 548, in read_text
    return PathBase.read_text(self, encoding, errors, newline)
           ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/pathlib/_abc.py", line 633, in read_text
    return f.read()
           ~~~~~~^^
  File "<frozen codecs>", line 325, in decode
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xeb in position 7548889: invalid continuation byte

There was also this cmd-output.txt, that the initial comments on this bug are discussing:

cmd: debdiff /tmp/debusine-fetch-exec-upload-c8ns7jau/141571_4ur_52rq/grep_3.11-4.dsc '/tmp/debusine-fetch-exec-upload-c8ns7jau/2502515_dy3utsnq/grep_3.12-1~exp2.dsc'
output (contains stderr only, stdout was captured):
usage: sopv-gpgv inline-verify [-h] [--debug] [--not-before TIMESTAMP]
                               [--not-after TIMESTAMP]
                               [--verifications-out VERIFICATIONS]
                               CERTS [CERTS ...]
sopv-gpgv inline-verify: error: the following arguments are required: CERTS
dpkg-source: warning: cannot verify inline signature for /tmp/debusine-fetch-exec-upload-c8ns7jau/141571_4ur_52rq/grep_3.11-4.dsc: error code 2
dpkg-source: warning: extracting unsigned source package (/tmp/debusine-fetch-exec-upload-c8ns7jau/2502515_dy3utsnq/grep_3.12-1~exp2.dsc)

Files in working directory:
debdiff.txt
--------------------
Edited by Stefano Rivera
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information