Package: libmkdoc-xml-perl
Version: 0.75-3 
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: randomness toolchain
X-Debbugs-Cc: [email protected]

At least the ciderwebmail package fails to build reproducibly
because MKDoc::XML::TreePrinter orders attributes randomly
in the XML it generates. Patch attached.
-- 
Niko Tyni   [email protected]
>From 150c53c470583cf8a7acdf001c4e508878da90a9 Mon Sep 17 00:00:00 2001
From: Niko Tyni <[email protected]>
Date: Thu, 20 Aug 2015 20:26:13 +0300
Subject: [PATCH] Sort attributes in XML output

This makes the XML output reproducible, so that the
order of the attributes stays the same on every call.
---
 lib/MKDoc/XML/TreePrinter.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/MKDoc/XML/TreePrinter.pm b/lib/MKDoc/XML/TreePrinter.pm
index b036fef..7b88cb5 100644
--- a/lib/MKDoc/XML/TreePrinter.pm
+++ b/lib/MKDoc/XML/TreePrinter.pm
@@ -49,7 +49,7 @@ sub process
 
         my $tag   = $node->{_tag};
         my %att   = map { $_ => _encode_quot ($node->{$_}) } grep !/^_/, keys %{$node};
-        my $attr  = join " ", map { "$_=\"$att{$_}\"" } keys %att;
+        my $attr  = join " ", map { "$_=\"$att{$_}\"" } sort keys %att;
         my $open  = $node->{_open};
         my $close = $node->{_close};
         
-- 
2.1.4

Reply via email to