Bug#880201: www.debian.org: Release notes formats (html, pdf, txt) are shown in different order for each release

2017-10-31 Thread Damyan Ivanov
-=| Laura Arjona Reina, 30.10.2017 15:49:34 +0100 |=-
> Package: www.debian.org
> Severity: minor
> 
> The order of the formats in releases notes is different for every release:
> 
> https://www.debian.org/releases/jessie/releasenotes
> 
> shows the release notes available ordered by arch and txt pdf html
> 
> https://www.debian.org/releases/stretch/releasenotes
> shows the release notes available ordered by arch and pdf html txt
> 
> https://www.debian.org/releases/buster/releasenotes not yet available
> 
> All those pages are built using the Perl sub permute_as_matrix_new
> present in
> https://anonscm.debian.org/viewvc/webwml/webwml/english/template/debian/release.wml?view=markup
> 
> Maybe the cause is L176 of that script:
> 
>  foreach $ext (keys %formats) {
> 
> Does the "keys" function return the values always in the same order? (not sure
> about this point,
> I've read http://perldoc.perl.org/functions/keys.html but I didn't understand
> it very well, and I'm not
> a Perl programmer).
> 
> If this is the issue, the solution would be to change that line to 
> something sorting the output of keys.

Yep, this needs to become "foreach $ext (sort keys %formats) {"

I have just committed the fix.


Cheers,
dam



Bug#880201: www.debian.org: Release notes formats (html, pdf, txt) are shown in different order for each release

2017-10-30 Thread Laura Arjona Reina
Package: www.debian.org
Severity: minor

The order of the formats in releases notes is different for every release:

https://www.debian.org/releases/jessie/releasenotes

shows the release notes available ordered by arch and txt pdf html

https://www.debian.org/releases/stretch/releasenotes
shows the release notes available ordered by arch and pdf html txt

https://www.debian.org/releases/buster/releasenotes not yet available

All those pages are built using the Perl sub permute_as_matrix_new
present in
https://anonscm.debian.org/viewvc/webwml/webwml/english/template/debian/release.wml?view=markup

Maybe the cause is L176 of that script:

 foreach $ext (keys %formats) {

Does the "keys" function return the values always in the same order? (not sure
about this point,
I've read http://perldoc.perl.org/functions/keys.html but I didn't understand
it very well, and I'm not
a Perl programmer).

If this is the issue, the solution would be to change that line to something
sorting the output of keys.

Former releases (not built dynamically anymore) also present the problem:

https://www.debian.org/releases/wheezy/releasenotes
txt html pdf
https://www.debian.org/releases/squeeze/releasenotes
txt pdf html
https://www.debian.org/releases/lenny/releasenotes
html pdf txt

but since they belong to releases that reached their end of life, maybe their
releases notes pages can stay like that.




-- System Information:
Debian Release: 9.1
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.9.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=es_ES.UTF-8, LC_CTYPE=es_ES.UTF-8 (charmap=UTF-8), 
LANGUAGE=es:en_GB (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)