Omit the list of system error code names from release builds, this
removes one cause of tarballs not being reproducible.
* build/generator/gen_base.py
(GeneratorBase.write_errno_table): Omit system error code names
in release mode.
@@ -289,6 +289,7 @@ class GeneratorBase:
])
# Remove ',' for c89 compatibility
+ if len(codes):
lines[-1] = lines[-1][0:-1]
lines.extend([
@@ -296,7 +297,12 @@ class GeneratorBase:
'',
])
- write_struct('svn__errno', errno.errorcode.items())
+ # errno names can vary depending on the Python, and possibly the
+ # OS, version and they are not even used by normal release builds
+ # so omit them from the tarball. We always want the struct itself
+ # so that SVN_DEBUG builds still compile.
+ write_struct('svn__errno',
+ [] if self.release_mode else errno.errorcode.items())
# Fetch and write apr_errno.h codes.
aprerr = []
