aboutsummaryrefslogtreecommitdiff
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-29 23:07:19 +0100
commit3e310b8cd603539a2de115b2b73e1db35403b426 (patch)
tree69a1c80384d6c717d43484d3f6f1068898fd0d20
parent8ea63c6c920c39e5a4ba176223fe472f92e2632a (diff)
downloadopenembedded-core-3e310b8cd603539a2de115b2b73e1db35403b426.zip
openembedded-core-3e310b8cd603539a2de115b2b73e1db35403b426.tar.gz
openembedded-core-3e310b8cd603539a2de115b2b73e1db35403b426.tar.bz2
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. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xscripts/combo-layer4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/combo-layer b/scripts/combo-layer
index fa60579..5d61fb1 100755
--- a/scripts/combo-layer
+++ b/scripts/combo-layer
@@ -665,6 +665,10 @@ def action_update(conf, args):
# Empty, ignore it. Must also remove from revlist.
with open(patch, 'r') as f:
fromline = f.readline()
+ if not fromline:
+ # Patch must have been empty to start with. No need
+ # to remove it.
+ continue
m = re.match(r'''^From ([0-9a-fA-F]+) .*\n''', fromline)
rev = m.group(1)
logger.debug('skipping empty patch %s = %s' % (patch, rev))