summaryrefslogtreecommitdiff
path: root/classes/base.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'classes/base.bbclass')
-rw-r--r--classes/base.bbclass11
1 files changed, 7 insertions, 4 deletions
diff --git a/classes/base.bbclass b/classes/base.bbclass
index 1b26b4d9ba..8c92ed6f76 100644
--- a/classes/base.bbclass
+++ b/classes/base.bbclass
@@ -448,11 +448,14 @@ python base_do_patch() {
else:
pnum = "1"
- dots = os.path.basename(unpacked).split(".")
- if len(dots) > 1:
- pname = ".".join(dots[:-1])
+ if "pname" in parm:
+ pname = parm["pname"]
else:
- pname = os.path.basename(unpacked)
+ dots = os.path.basename(unpacked).split(".")
+ if len(dots) > 1:
+ pname = ".".join(dots[:-1])
+ else:
+ 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)