Bug#996785: deb822-repro: doesn't support leading tabs when assigning values
Jelmer Vernooij
jelmer at debian.org
Mon Oct 18 18:22:18 BST 2021
Package: python3-debian
Version: 0.1.39
Severity: normal
X-Debbugs-Cc: nthykier at debian.org
python-debian doesn't seem to support assigning fields that contain tabs:
>>> from debian._deb822_repro import parse_deb822_file
>>> x = parse_deb822_file(["Source: foo\n", "Depends: bar\n"])
>>> next(x.iter_parts())['Depends'] = 'debhelper (>= 10), quilt (>= 0.40),\n\tlibsystemd-dev [linux-any], pkg-config'
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/jelmer/src/python-debian/lib/debian/_deb822_repro/parsing.py", line 1418, in __setitem__
self._paragraph.set_field_from_raw_string(
File "/home/jelmer/src/python-debian/lib/debian/_deb822_repro/parsing.py", line 2012, in set_field_from_raw_string
raise ValueError(msg.format(i=i, line=line[0]))
ValueError: Line 2 in new value was invalid. It must either start with " " space (continuation line) or "#" (comment line). The line started with " "
(This works with the old parser)
-- System Information:
Debian Release: bookworm/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 5.10.0-8-amd64 (SMP w/2 CPU threads)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages python3-debian depends on:
ii python3 3.9.2-3
ii python3-chardet 4.0.0-1
ii python3-six 1.16.0-2
Versions of packages python3-debian recommends:
ii python3-apt 2.2.1
Versions of packages python3-debian suggests:
ii gpgv 2.2.27-2
-- no debconf information
More information about the pkg-python-debian-maint
mailing list