[PATCH 3/9] sb: Do not report current date

Sebastian Huber sebastian.huber at embedded-brains.de
Mon Dec 8 06:48:46 UTC 2014


This makes the report reproducible.
---
 source-builder/sb/reports.py | 19 ++++++++-----------
 1 file changed, 8 insertions(+), 11 deletions(-)

diff --git a/source-builder/sb/reports.py b/source-builder/sb/reports.py
index f158925..d573003 100644
--- a/source-builder/sb/reports.py
+++ b/source-builder/sb/reports.py
@@ -23,7 +23,6 @@
 #
 
 import copy
-import datetime
 import os
 import sys
 
@@ -78,10 +77,10 @@ class formatter(object):
     def ext(self):
         raise error.general('internal error: formatter.ext() not implemented')
 
-    def introduction(self, name, now, intro_text):
+    def introduction(self, name, intro_text):
         c = chunk()
         c.line('=' * _line_len)
-        c.line('%s %s' % (_title, now))
+        c.line(_title)
         if intro_text:
             c.line('')
             c.line('%s' % ('\n'.join(intro_text)))
@@ -96,7 +95,7 @@ class asciidoc_formatter(formatter):
     def ext(self):
         return '.txt'
 
-    def introduction(self, name, now, intro_text):
+    def introduction(self, name, intro_text):
         c = chunk()
         h = 'RTEMS Source Builder Report'
         c.line(h)
@@ -109,7 +108,6 @@ class asciidoc_formatter(formatter):
         c.line(':data-uri:')
         c.line('')
         c.line(_title)
-        c.line(now)
         c.line('')
         image = _make_path(self.sbpath, options.basepath, 'images', 'rtemswhitebg.jpg')
         c.line('image:%s["RTEMS",width="20%%"]' % (image))
@@ -132,10 +130,10 @@ class text_formatter(formatter):
     def ext(self):
         return '.txt'
 
-    def introduction(self, name, now, intro_text):
+    def introduction(self, name, intro_text):
         c = chunk()
         c.line('=' * _line_len)
-        c.line('%s %s' % (_title, now))
+        c.line('%s' % (_title))
         if intro_text:
             c.line('')
             c.line('%s' % ('\n'.join(intro_text)))
@@ -150,10 +148,10 @@ class ini_formatter(text_formatter):
     def ext(self):
         return '.ini'
 
-    def introduction(self, name, now, intro_text):
+    def introduction(self, name, intro_text):
         c = chunk()
         c.line(';')
-        c.line('; %s %s' % (_title, now))
+        c.line('; %s' % (_title))
         if intro_text:
             c.line(';')
             c.line('; %s' % ('\n; '.join(intro_text)))
@@ -294,8 +292,7 @@ class report:
             self.output('')
 
     def introduction(self, name, intro_text = None):
-        now = datetime.datetime.now().ctime()
-        self.out += self.formatter.introduction(name, now, intro_text)
+        self.out += self.formatter.introduction(name, intro_text)
         self.git_status()
 
     def config_start(self, name, _config):
-- 
1.8.4.5




More information about the devel mailing list