Changeset 841120e in rtems-source-builder


Ignore:
Timestamp:
Sep 18, 2019, 11:40:36 PM (5 weeks ago)
Author:
Chris Johns <chrisj@…>
Branches:
master
Children:
83e0c3d
Parents:
129e576
Message:

sb: Detect duplicate adds of patches.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • source-builder/sb/sources.py

    r129e576 r841120e  
    3535        error('%%%s requires at least 2 arguments' % (label))
    3636    _map = '%s-%s' % (label, args[0])
     37    _value = ' '.join(args[1:])
    3738    macros.create_map(_map)
    3839    index = 0
     
    4142        if key not in macros.map_keys(_map):
    4243            break
     44        macros.set_read_map(_map)
     45        value = macros.get_value(key)
     46        macros.unset_read_map(_map)
     47        if value == _value:
     48            error('%%%s duplicate add: %s' % (label, _value))
    4349        index += 1
    4450    macros.set_write_map(_map)
    45     macros.define(key, ' '.join(args[1:]))
     51    macros.define(key, _value)
    4652    macros.unset_write_map()
    4753    return None
Note: See TracChangeset for help on using the changeset viewer.