[PATCH v1] rpc: reproducible genprotocol output

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If the same source gets built twice ('build same source on different
hosts at different times') the resulting files may differ.
Fix this by sorting the hash keys before usage.

Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>
---
 src/rpc/genprotocol.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/rpc/genprotocol.pl b/src/rpc/genprotocol.pl
index 6ce268c024..6baa4f22d5 100755
--- a/src/rpc/genprotocol.pl
+++ b/src/rpc/genprotocol.pl
@@ -104,7 +104,7 @@ while (<RPCGEN>) {
         if (keys %uses >= 1) {
             my $i = 1;
 
-            foreach (keys %uses) {
+            foreach (sort(keys %uses)) {
                 $i = $uses{$_};
                 unshift @function,
                 ("        char **objp_cpp$i = (char **) (void *) &$_;\n");

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux