diff options
author | Tomasz Dziendzielski <tomasz.dziendzielski@gmail.com> | 2019-01-25 20:55:33 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-01-27 13:05:17 +0000 |
commit | b73dc9f6f26f6eea6f4332a4b027e3ace5b5d720 (patch) | |
tree | d5241c60912faea5981b1765610acece8d5714a7 /meta/lib | |
parent | ad38a64a26fbd37cb1a452beae7e2316409729a0 (diff) | |
download | poky-b73dc9f6f26f6eea6f4332a4b027e3ace5b5d720.tar.gz |
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.
(From OE-Core rev: 1e38d74a2ca7638b1f54e2bb5617903c2683e484)
Signed-off-by: Tomasz Dziendzielski <tomasz.dziendzielski@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r-- | meta/lib/oe/patch.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.py index 8c8e96a2dc..7dd31d9d46 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): | |||
793 | """Return the local path of a patch, or return nothing if this isn't a patch""" | 793 | """Return the local path of a patch, or return nothing if this isn't a patch""" |
794 | 794 | ||
795 | local = fetch.localpath(url) | 795 | local = fetch.localpath(url) |
796 | if os.path.isdir(local): | ||
797 | return | ||
796 | base, ext = os.path.splitext(os.path.basename(local)) | 798 | base, ext = os.path.splitext(os.path.basename(local)) |
797 | if ext in ('.gz', '.bz2', '.xz', '.Z'): | 799 | if ext in ('.gz', '.bz2', '.xz', '.Z'): |
798 | if expand: | 800 | if expand: |