File: Sort-commandline-arguments.patch

package info (click to toggle)
webassets 3%3A3.0.0-0.1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,364 kB
  • sloc: python: 8,703; makefile: 92; sh: 3
file content (17 lines) | stat: -rw-r--r-- 728 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Author: Reiner Herrmann <reiner@reiner-h.de>
Description: Sort commandline arguments to produce stable output
 The help text is used to generate a manpage with help2man.
 With an unstable argument order the generated manpage will
 differ on every build.

--- a/src/webassets/script.py
+++ b/src/webassets/script.py
@@ -447,7 +447,7 @@
 
         # Add subparsers.
         subparsers = parser.add_subparsers(dest='command')
-        for command in CommandLineEnvironment.DefaultCommands.keys():
+        for command in sorted(CommandLineEnvironment.DefaultCommands.keys()):
             command_parser = subparsers.add_parser(command)
             maker = getattr(self, 'make_%s_parser' % command, False)
             if maker: