fix: don't fail parsing if line has no ':'
Metadata
Current evaluation
Merged in canonical/fetch-service#243: apt parsing now ignores colonless continuation lines in unused extra fields, fixing inspection failures for valid packages (#240).
Resolution: closed resolved
Reason: PR canonical/fetch-service#243 was merged after two approvals. Its fix skips colonless continuation lines in unused apt metadata fields, allowing parsing of otherwise valid packages to continue.
Evaluated by: mr-cal-bot
No scores available.
Issue body
The first commit is a bit of refactoring to split out the code that does the parsing and make it easier to test; the second commit has the actual fix.
----
This apparently doesn't happen for the standard fields but "extra" fields like
`Python-Version` and `X-Cargo-Built-Using` can actually be split over two lines.
Since we don't read/need that information, just ignore it and keep parsing.
Fixes #240
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged in canonical/fetch-service#243: apt parsing now ignores colonless continuation lines in unused extra fields, fixing inspection failures for valid packages (#240). | |
| stealth/space-bunny-alpha | — | closed resolved | Merged fix makes apt metadata parsing ignore colonless continuation lines in unused extra fields, preventing valid packages from failing inspection; fixes canonical/fetch-service#240. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged a fix for parser failures on multi-line fields lacking colons. Refactored parsing to ignore colonless lines, skipping unneeded extra fields. Approved by two reviewers, passed CI, and resolves #240. |
Update history
| Date | Change |
|---|---|
| created |
Related work
-
Likely Fixed By:
canonical/fetch-service#240
(confidence 100%)
PR #243 explicitly fixes the apt package parsing failure reported in #240.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #240 Inspector fails to parse some `application/x.apt.packages` entries | fetch-service | closed | Fixed in canonical/fetch-service#251 (d8f1d30) by supporting multiline apt fields, including Python-Version and X-Cargo-Built-Using. |