Bug#952670: packages.debian.org: issues with suites not using MD5 checksums

"Adam D. Barratt" <[email protected]>
Newsgroups gmane.linux.debian.devel.www
Message-ID <9a4a6ccea724509f5161fa5aabda5b90__4579.20337082527$1582797803$gmane$org@mail.adam-barratt.org.uk>
Package: www.debian.org
User: [email protected]
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.