Bug#996785: deb822-repro: doesn't support leading tabs when assigning values
Niels Thykier
niels at thykier.net
Mon Oct 18 19:40:40 BST 2021
Control: tags -1 -moreinfo +confirmed
Niels Thykier:
> Control: tags -1 moreinfo
>
> Jelmer Vernooij:
>> 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)
>>
>> [...]
>
> Hi Jelmer,
>
> This looks a lot like something I fixed in 0.1.42. Could you please
> have a look at whether this persists with the latest version of
> python-debian.
>
> Thanks,
> ~Niels
>
Ok, Version header was irrelevant because I could reproduce it on
master. I will submit a MR for this soon.
~Niels
More information about the pkg-python-debian-maint
mailing list