1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
Description: Make the build reproducible
Author: Chris Lamb <lamby@debian.org>
Last-Update: 2016-08-29
--- python-gflags-1.5.1.orig/gflags2man.py
+++ python-gflags-1.5.1/gflags2man.py
@@ -174,6 +174,8 @@ class ProgramInfo(object):
self.modules = {} # { section_name(string), [ flags ] }
self.module_list = [] # list of module names in their original order
self.date = time.localtime(time.time()) # default date info
+ if 'SOURCE_DATE_EPOCH' in os.environ:
+ self.date = time.gmtime(int(os.environ['SOURCE_DATE_EPOCH']))
def Run(self):
"""Run it and collect output.
@@ -188,6 +190,8 @@ class ProgramInfo(object):
finfo = os.stat(self.executable)
self.date = time.localtime(finfo[stat.ST_MTIME])
+ if 'SOURCE_DATE_EPOCH' in os.environ:
+ self.date = time.gmtime(int(os.environ['SOURCE_DATE_EPOCH']))
logging.info('Running: %s %s </dev/null 2>&1'
% (self.executable, FLAGS.help_flag))
|