docs: use predictable ordering in generated documentation
authorMaximilian Engelhardt <maxi@daemonizer.de>
Fri, 18 Dec 2020 20:42:34 +0000 (21:42 +0100)
committerHans van Kranenburg <hans@knorrie.org>
Mon, 13 Sep 2021 09:51:21 +0000 (11:51 +0200)
When the seq number is equal, sort by the title to get predictable
output ordering. This is useful for reproducible builds.

Signed-off-by: Maximilian Engelhardt <maxi@daemonizer.de>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
(cherry picked from commit e18dadc5b709290b8038a1cacb52bc3b3b69cf21)

docs/xen-headers

index 54155632c46e001e0b09995da3e8be9f01c91d5b..8c434d77e20ed0a8aa0a17dd7a5daa125caeac3c 100755 (executable)
@@ -331,7 +331,7 @@ sub output_index () {
 <h2>Starting points</h2>
 <ul>
 END
-    foreach my $ic (sort { $a->{Seq} <=> $b->{Seq} } @incontents) {
+    foreach my $ic (sort { $a->{Seq} <=> $b->{Seq} or $a->{Title} cmp $b->{Title} } @incontents) {
         $o .= "<li><a href=\"$ic->{Href}\">$ic->{Title}</a></li>\n";
     }
     $o .= "</ul>\n";