]> code.ossystems Code Review - openembedded-core.git/commitdiff
combo-layer: handle file_exclude matching dirs
authorOlaf Mandel <o.mandel@menlosystems.com>
Fri, 21 Oct 2016 09:24:27 +0000 (09:24 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 28 Oct 2016 10:27:33 +0000 (11:27 +0100)
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.

Signed-off-by: Olaf Mandel <o.mandel@menlosystems.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/combo-layer

index 089b65f97e92add941a41fe1b0b7b22719ed4d4e..d04d88b0706b47b26569e1112a0a049482a930a9 100755 (executable)
@@ -294,6 +294,8 @@ def action_init(conf, args):
                     # again. Uses the list of files created by tar (easier
                     # than walking the tree).
                     for file in files.split('\n'):
+                        if file.endswith(os.path.sep):
+                            continue
                         for pattern in exclude_patterns:
                             if fnmatch.fnmatch(file, pattern):
                                 os.unlink(os.path.join(*([extract_dir] + ['..'] * subdir_components + [file])))