Bug#952670: packages.debian.org: issues with suites not using MD5 checksums
Package: www.debian.org
User: www.debian.org@packages.debian.org
Usertags: packages
Severity: important
Tags: patch
Hi,
The Sources file parsing in the packages codebase assumes that every
stanza has a Files: field. That is no longer true for some suites,
including stable-backports. This causes internal server errors when
viewing a source package information page directly, and the lack of
links to source package-related information on binary package pages.
From what I could see, the consuming code only expects the element to
follow the general structure of a Files: field, rather than being too
precise on details like checksum length. The following patch appears to
be sufficient to make at least basic functionality operate:
--- /srv/packages.debian.org/bin/parse-sources 2020-02-14
06:06:33.126000572 +0000
+++ ./parse-sources 2020-02-27 09:49:07.123732777 +0000
@@ -103,6 +103,7 @@
$source_names_suite{$data{'package'}} = 1;
delete $data{'binary'};
+ $data{files} = $data{'checksums-sha256'} unless
$data{files};
$data{files} =~ s/\s*\n\s*/\01/sog;
$data{files} =~ s/^\01//sg;
(although I agree it's far from perfect)
Regards,
Adam
Reply to: