Skip to content

Issue warnings if apt_pkg request is not honoured

Deb822.iter_paragraphs() can use apt_pkg and that is the default usage for Sources and Packages files, for instance. If given a file-like object that is not actually a filehandle, however, iter_paragraphs will switch to its own internal parser which can have slightly different behaviour.

This patch causes a warning to be emitted if the caller has requested that the apt_pkg parser be used but iter_paragraphs cannot honour that request.

See discussion in https://bugs.debian.org/913274

Edited by Stuart Prescott

Merge request reports

Loading