summaryrefslogtreecommitdiffstats
path: root/scripts/combo-layer
diff options
context:
space:
mode:
authorOlaf Mandel <o.mandel@menlosystems.com>2016-10-21 09:24:27 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-10-28 16:15:21 +0100
commit9af59d07a358fe23bff10ee957bf8fc63344e8e2 (patch)
treea4fe009e0811b72c7d473942c22b09091861213d /scripts/combo-layer
parentb48ed35fd50aca0edd9cd573e8b79b69e25f81a3 (diff)
downloadpoky-9af59d07a358fe23bff10ee957bf8fc63344e8e2.tar.gz
combo-layer: handle file_exclude matching dirs
If file_exclude matches a directory, os.unlink() got called with this directory as an argument. Filter out paths that end in a directory separator. This still leaves the (then empty) directories, but this does not affect the git commit. (From OE-Core rev: e84b9185cc8f8e9f9df0e050543bb3a2c59426c3) Signed-off-by: Olaf Mandel <o.mandel@menlosystems.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/combo-layer')
-rwxr-xr-xscripts/combo-layer2
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/combo-layer b/scripts/combo-layer
index 089b65f97e..d04d88b070 100755
--- a/scripts/combo-layer
+++ b/scripts/combo-layer
@@ -294,6 +294,8 @@ def action_init(conf, args):
294 # again. Uses the list of files created by tar (easier 294 # again. Uses the list of files created by tar (easier
295 # than walking the tree). 295 # than walking the tree).
296 for file in files.split('\n'): 296 for file in files.split('\n'):
297 if file.endswith(os.path.sep):
298 continue
297 for pattern in exclude_patterns: 299 for pattern in exclude_patterns:
298 if fnmatch.fnmatch(file, pattern): 300 if fnmatch.fnmatch(file, pattern):
299 os.unlink(os.path.join(*([extract_dir] + ['..'] * subdir_components + [file]))) 301 os.unlink(os.path.join(*([extract_dir] + ['..'] * subdir_components + [file])))