All of lore.kernel.org
 help / color / mirror / Atom feed
From: Olaf Mandel <o.mandel@menlosystems.com>
To: openembedded-core@lists.openembedded.org
Cc: Olaf Mandel <o.mandel@menlosystems.com>
Subject: [PATCH v2] combo-layer: handle file_exclude matching dirs
Date: Fri, 21 Oct 2016 09:24:27 +0000	[thread overview]
Message-ID: <1477041868-7097-2-git-send-email-o.mandel@menlosystems.com> (raw)
In-Reply-To: <1477041868-7097-1-git-send-email-o.mandel@menlosystems.com>
In-Reply-To: <1476721424-18923-1-git-send-email-o.mandel@menlosystems.com>

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>
---
 scripts/combo-layer | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/scripts/combo-layer b/scripts/combo-layer
index 089b65f..d04d88b 100755
--- a/scripts/combo-layer
+++ b/scripts/combo-layer
@@ -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])))
-- 
2.1.4



  reply	other threads:[~2016-10-21  9:24 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-21  9:24 Forgot Signed-off-by lines Olaf Mandel
2016-10-17 16:23 ` [PATCH] combo-layer: handle file_exclude matching dirs Olaf Mandel
2016-10-21  9:24   ` Olaf Mandel [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-10-19 10:05 [PATCH 0/1] $COREBASE/LICENSE in LIC_FILES_CHKSUM Olaf Mandel
2016-10-19 10:05 ` [PATCH 1/1] Remove $COREBASE/LICENSE from LIC_FILES_CHKSUM Olaf Mandel
2016-10-20 10:44   ` Peter Kjellerstedt
2016-10-20 11:11     ` Olaf Mandel
2016-10-21  9:24   ` [PATCH v2] " Olaf Mandel
2016-10-20 23:29 ` [PATCH 0/1] $COREBASE/LICENSE in LIC_FILES_CHKSUM Paul Eggleton
2016-10-21 14:05   ` Olaf Mandel
2016-10-21 14:36   ` Denys Dmytriyenko
2016-10-21 19:36   ` Paul Eggleton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1477041868-7097-2-git-send-email-o.mandel@menlosystems.com \
    --to=o.mandel@menlosystems.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.