Patchwork [U-Boot,1/2] buildman: Allow conflicting tags to avoid spurious errors

login
register
mail settings
Submitter Simon Glass
Date May 3, 2013, 12:46 a.m.
Message ID <1367541963-21649-1-git-send-email-sjg@chromium.org>
Download mbox | patch
Permalink /patch/241121/
State Accepted, archived
Delegated to: Simon Glass
Headers show

Comments

Simon Glass - May 3, 2013, 12:46 a.m.
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.

Signed-off-by: Simon Glass <sjg@chromium.org>
---
 tools/buildman/control.py | 5 +++++
 tools/patman/series.py    | 4 +++-
 2 files changed, 8 insertions(+), 1 deletion(-)
Tom Rini - May 3, 2013, 11:25 p.m.
On Thu, May 02, 2013 at 05:46:02PM -0700, Simon Glass wrote:

> 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.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>  tools/buildman/control.py | 5 +++++
>  tools/patman/series.py    | 4 +++-
>  2 files changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/buildman/control.py b/tools/buildman/control.py
> index 8d7b9b5..1ce8b6f 100644
> --- a/tools/buildman/control.py
> +++ b/tools/buildman/control.py
> @@ -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
> +    # then. For example, Series-version is not useful for buildman. On the

s/then/them/

Feel free to fix in-line and pull request.

Reviewed-by: Tom Rini <trini@ti.com>
Simon Glass - May 6, 2013, 2:33 p.m.
Hi Tom,

On Fri, May 3, 2013 at 5:25 PM, Tom Rini <trini@ti.com> wrote:
> On Thu, May 02, 2013 at 05:46:02PM -0700, Simon Glass wrote:
>
>> 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.
>>
>> Signed-off-by: Simon Glass <sjg@chromium.org>
>> ---
>>  tools/buildman/control.py | 5 +++++
>>  tools/patman/series.py    | 4 +++-
>>  2 files changed, 8 insertions(+), 1 deletion(-)
>>
>> diff --git a/tools/buildman/control.py b/tools/buildman/control.py
>> index 8d7b9b5..1ce8b6f 100644
>> --- a/tools/buildman/control.py
>> +++ b/tools/buildman/control.py
>> @@ -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
>> +    # then. For example, Series-version is not useful for buildman. On the
>
> s/then/them/
>
> Feel free to fix in-line and pull request.
>
> Reviewed-by: Tom Rini <trini@ti.com>

OK, will do.

Regards,
Simon
Simon Glass - May 13, 2013, 2:29 a.m.
On Mon, May 6, 2013 at 8:33 AM, Simon Glass <sjg@chromium.org> wrote:
> Hi Tom,
>
> On Fri, May 3, 2013 at 5:25 PM, Tom Rini <trini@ti.com> wrote:
>> On Thu, May 02, 2013 at 05:46:02PM -0700, Simon Glass wrote:
>>
>>> 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.
>>>
>>> Signed-off-by: Simon Glass <sjg@chromium.org>
>>> ---
>>>  tools/buildman/control.py | 5 +++++
>>>  tools/patman/series.py    | 4 +++-
>>>  2 files changed, 8 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/tools/buildman/control.py b/tools/buildman/control.py
>>> index 8d7b9b5..1ce8b6f 100644
>>> --- a/tools/buildman/control.py
>>> +++ b/tools/buildman/control.py
>>> @@ -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
>>> +    # then. For example, Series-version is not useful for buildman. On the
>>
>> s/then/them/
>>
>> Feel free to fix in-line and pull request.
>>
>> Reviewed-by: Tom Rini <trini@ti.com>
>
> OK, will do.

Fixed typo, and:

Applied to x86/patman.

Patch

diff --git a/tools/buildman/control.py b/tools/buildman/control.py
index 8d7b9b5..1ce8b6f 100644
--- a/tools/buildman/control.py
+++ b/tools/buildman/control.py
@@ -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
+    # then. 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)
 
diff --git a/tools/patman/series.py b/tools/patman/series.py
index 783b3dd..85ed316 100644
--- a/tools/patman/series.py
+++ b/tools/patman/series.py
@@ -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([]):