diff options
author | Otavio Salvador <otavio@ossystems.com.br> | 2018-08-22 21:58:39 -0300 |
---|---|---|
committer | Otavio Salvador <otavio@ossystems.com.br> | 2018-08-22 21:58:39 -0300 |
commit | 801658c710e3a59ce9dc8d5fa892f1865071fc94 (patch) | |
tree | 86b40f5c220351cbf2be2f685d80b2d0ca9b1d57 /recipes-kernel | |
parent | 7a5f1e14504e43bf41ebb9f36cb56bd71cceab32 (diff) | |
download | meta-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.inc | 13 |
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() |