[oe-commits] [openembedded-core] 02/08: lib/oe/patch.py: Fix applying a directory as a patch
git at git.openembedded.org
git at git.openembedded.org
Sat Jan 26 13:41:01 UTC 2019
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
commit 1e38d74a2ca7638b1f54e2bb5617903c2683e484
Author: Tomasz Dziendzielski <tomasz.dziendzielski at gmail.com>
AuthorDate: Fri Jan 25 20:55:33 2019 +0100
lib/oe/patch.py: Fix applying a directory as a patch
If a SRC_URI content ends with '.patch' bitbake is
trying to apply it as it's a patch file.
It causes that if we use git repository for 'patch' package
the bare clone is extracted to a directory
(i.e. build/downloads/git2/git.mirror.org.patch/) which is considered
to be a patch file, so patch.py tries to apply that directory as a patch
which ends up with a failure.
Signed-off-by: Tomasz Dziendzielski <tomasz.dziendzielski at gmail.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/lib/oe/patch.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.py
index 8c8e96a..7dd31d9 100644
--- a/meta/lib/oe/patch.py
+++ b/meta/lib/oe/patch.py
@@ -793,6 +793,8 @@ def patch_path(url, fetch, workdir, expand=True):
"""Return the local path of a patch, or return nothing if this isn't a patch"""
local = fetch.localpath(url)
+ if os.path.isdir(local):
+ return
base, ext = os.path.splitext(os.path.basename(local))
if ext in ('.gz', '.bz2', '.xz', '.Z'):
if expand:
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list