summaryrefslogtreecommitdiffstats
path: root/scripts/combo-layer
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2015-03-27 14:53:12 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-03-31 22:23:17 +0100
commit240dadea1207892701646e3b385ac018712720d2 (patch)
tree1c637412d99bfdba9e6357f88367b48f5e31c5dc /scripts/combo-layer
parent3775c6e7147dec71fde7121870bf919525138c28 (diff)
downloadpoky-240dadea1207892701646e3b385ac018712720d2.tar.gz
combo-layer: fix file_exclude for empty commits
The code detecting empty patches after removing files with file_exclude failed for commits which were already empty before (like the initial commit in some repos): such patches are completely empty files, without a From line. Detect that case and just let the normal empty patch detection deal with it. (From OE-Core rev: 3e310b8cd603539a2de115b2b73e1db35403b426) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/combo-layer')
-rwxr-xr-xscripts/combo-layer4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/combo-layer b/scripts/combo-layer
index fa60579272..5d61fb1c16 100755
--- a/scripts/combo-layer
+++ b/scripts/combo-layer
@@ -665,6 +665,10 @@ def action_update(conf, args):
665 # Empty, ignore it. Must also remove from revlist. 665 # Empty, ignore it. Must also remove from revlist.
666 with open(patch, 'r') as f: 666 with open(patch, 'r') as f:
667 fromline = f.readline() 667 fromline = f.readline()
668 if not fromline:
669 # Patch must have been empty to start with. No need
670 # to remove it.
671 continue
668 m = re.match(r'''^From ([0-9a-fA-F]+) .*\n''', fromline) 672 m = re.match(r'''^From ([0-9a-fA-F]+) .*\n''', fromline)
669 rev = m.group(1) 673 rev = m.group(1)
670 logger.debug('skipping empty patch %s = %s' % (patch, rev)) 674 logger.debug('skipping empty patch %s = %s' % (patch, rev))