diff options
-rw-r--r-- | classes/base.bbclass | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/classes/base.bbclass b/classes/base.bbclass index 33d2d7c171..1b26b4d9ba 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -436,9 +436,9 @@ python base_do_patch() { local = os.path.join('/', bb.fetch.localpath(url, d)) # did it need to be unpacked? - dots = local.split(".") + dots = os.path.basename(local).split(".") if dots[-1] in ['gz', 'bz2', 'Z']: - unpacked = os.path.join(bb.data.getVar('WORKDIR', d),os.path.basename('.'.join(dots[0:-1]))) + unpacked = os.path.join(bb.data.getVar('WORKDIR', d),'.'.join(dots[0:-1])) else: unpacked = local unpacked = bb.data.expand(unpacked, d) @@ -452,7 +452,7 @@ python base_do_patch() { if len(dots) > 1: pname = ".".join(dots[:-1]) else: - pname = unpacked + pname = os.path.basename(unpacked) bb.note("Applying patch '%s'" % pname) bb.data.setVar("do_patchcmd", bb.data.getVar("PATCHCMD", d, 1) % (pnum, pname, unpacked), d) |