debian: fix deb822 writer/parser asymmetries

write_paragraph emitted a bare-space continuation line for empty lines
inside a value, which parse_paragraphs treated as a paragraph separator
and silently dropped the rest of the value; blank lines are now encoded
as ' .' like dpkg does and decoded back on read. Tab-indented
continuation lines now strip exactly one tab instead of keeping it.

Clearsigned .dsc content no longer leaks armor metadata into parsed
fields: the Hash:/Comment: header and the signature trailer are
stripped before parse_paragraphs at both .dsc parse sites.
This commit is contained in:
2026-09-16 03:42:30 +02:00
parent dc6a019a13
commit 38562abe2c
4 changed files with 151 additions and 14 deletions
+3 -1
View File
@@ -24,6 +24,8 @@ pub use changelog::{
parse_previous_version_from_str,
};
pub use checksums::{Entry as ChecksumEntry, FileChecksums};
pub use control::{ControlInfo, Paragraph, parse_paragraphs, write_paragraph};
pub use control::{
ControlInfo, Paragraph, parse_paragraphs, strip_clearsigned_armour, write_paragraph,
};
pub use files::{FilesEntry, FilesList};
pub use version::DebianVersion;