From e5df6027fdcab8ef927a28cef04f8209458abf66 Mon Sep 17 00:00:00 2001 From: "nslu2-linux.adm@bkbits.net" Date: Thu, 20 Jan 2005 07:40:09 +0000 Subject: Merge bk://oe-devel.bkbits.net/openembedded into bkbits.net:/repos/n/nslu2-linux/openembedded 2005/01/20 02:26:21-05:00 handhelds.org!kergoth Fix base_do_patch when applying patches with no extension in the filename. BKrev: 41ef605976xbq6OfMXpNpf0rLQcAhA --- classes/base.bbclass | 6 +++--- 1 file 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) -- cgit v1.2.3