path: root/scripts
diff options
authorPatrick Ohly <>2015-03-27 14:53:12 +0100
committerRichard Purdie <>2015-03-31 22:24:34 +0100
commitef73b474fbcb7673a0bafc47b907f802adfa02bc (patch)
tree2bf37214833201fe79f5b3fc0b60d3b6f78804f0 /scripts
parentb936350fc2089672731f56434886f8c83b47d5a3 (diff)
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: 6fd7f40728ebf57dfbc367dedeaf350b8d69784c) Signed-off-by: Patrick Ohly <> Signed-off-by: Richard Purdie <>
Diffstat (limited to 'scripts')
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 =
logger.debug('skipping empty patch %s = %s' % (patch, rev))
OpenPOWER on IntegriCloud