summaryrefslogtreecommitdiffstats
path: root/recipes-kernel
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2018-08-22 21:58:39 -0300
committerOtavio Salvador <otavio@ossystems.com.br>2018-08-22 21:58:39 -0300
commit801658c710e3a59ce9dc8d5fa892f1865071fc94 (patch)
tree86b40f5c220351cbf2be2f685d80b2d0ca9b1d57 /recipes-kernel
parent7a5f1e14504e43bf41ebb9f36cb56bd71cceab32 (diff)
downloadmeta-freescale-801658c710e3a59ce9dc8d5fa892f1865071fc94.tar.gz
linux-mfgtool.inc: This reduce the extender class
This removes duplicated code from the extender class and instead calls the parent's code. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Diffstat (limited to 'recipes-kernel')
-rw-r--r--recipes-kernel/linux/linux-mfgtool.inc13
1 files changed, 2 insertions, 11 deletions
diff --git a/recipes-kernel/linux/linux-mfgtool.inc b/recipes-kernel/linux/linux-mfgtool.inc
index 915090dc..dc06c541 100644
--- a/recipes-kernel/linux/linux-mfgtool.inc
+++ b/recipes-kernel/linux/linux-mfgtool.inc
@@ -52,18 +52,9 @@ python () {
52 52
53 class LinuxMfgToolExtender(ClassExtender): 53 class LinuxMfgToolExtender(ClassExtender):
54 def extend_name(self, name): 54 def extend_name(self, name):
55 if name.startswith("rtld"): 55 if name.startswith("kernel-"):
56 return name
57 if name.endswith("-" + self.extname):
58 name = name.replace("-" + self.extname, "")
59 if name.startswith("virtual/"):
60 subs = name.split("/", 1)[1]
61 if not subs.startswith(self.extname):
62 return "virtual/" + self.extname + "-" + subs
63 return name
64 if not name.startswith(self.extname):
65 return self.extname + "-" + name 56 return self.extname + "-" + name
66 return name 57 return super().extend_name(name)
67 58
68 clsextend = LinuxMfgToolExtender("mfgtool", d) 59 clsextend = LinuxMfgToolExtender("mfgtool", d)
69 clsextend.rename_packages() 60 clsextend.rename_packages()