]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
buildman: Allow conflicting tags to avoid spurious errors
authorSimon Glass <sjg@chromium.org>
Thu, 2 May 2013 14:46:02 +0000 (14:46 +0000)
committerSimon Glass <sjg@chromium.org>
Thu, 9 May 2013 21:27:38 +0000 (14:27 -0700)
Conflicting tags can prevent buildman from building two series which exist
one after the other in a branch. There is no reason not to allow this sort
of workflow with buildman, so ignore conflicting tags in buildman.

Change-Id: I2231d04d8684fe0f8fe77f8ea107e5899a3da5e8
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@ti.com>
tools/buildman/control.py
tools/patman/series.py

index 8d7b9b547346aed682dd944b207eeb64c57bfb3a..3e5f56c2802c731deb310d093afbb42b26ab5359 100644 (file)
@@ -137,6 +137,11 @@ def DoBuildman(options, args):
     upstream_commit = gitutil.GetUpstream(options.git_dir, options.branch)
     series = patchstream.GetMetaDataForList(upstream_commit, options.git_dir,
             1)
+    # Conflicting tags are not a problem for buildman, since it does not use
+    # them. For example, Series-version is not useful for buildman. On the
+    # other hand conflicting tags will cause an error. So allow later tags
+    # to overwrite earlier ones.
+    series.allow_overwrite = True
     series = patchstream.GetMetaDataForList(range_expr, options.git_dir, None,
             series)
 
index 783b3dd1338483ba7e5b7f6d8ddd61ee325f0902..85ed31688a1051d0d06579f104b859bcafa4e2be 100644 (file)
@@ -40,6 +40,7 @@ class Series(dict):
         notes: List of lines in the notes
         changes: (dict) List of changes for each version, The key is
             the integer version number
+        allow_overwrite: Allow tags to overwrite an existing tag
     """
     def __init__(self):
         self.cc = []
@@ -49,6 +50,7 @@ class Series(dict):
         self.cover = None
         self.notes = []
         self.changes = {}
+        self.allow_overwrite = False
 
         # Written in MakeCcFile()
         #  key: name of patch file
@@ -72,7 +74,7 @@ class Series(dict):
         """
         # If we already have it, then add to our list
         name = name.replace('-', '_')
-        if name in self:
+        if name in self and not self.allow_overwrite:
             values = value.split(',')
             values = [str.strip() for str in values]
             if type(self[name]) != type([]):