diff options
author | Dongxiao Xu <dongxiao.xu@intel.com> | 2012-04-01 20:14:12 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-04-05 14:00:26 +0100 |
commit | 048aa0d472eb01cd0e4bb8ad2ec02f02ea43b395 (patch) | |
tree | c7c1595569ff25732f9163ce25a49174e1a9a28b /bitbake | |
parent | 20ea123c2841dd35f49fcdcc92cd3ce6d907c23f (diff) | |
download | openembedded-core-contrib-048aa0d472eb01cd0e4bb8ad2ec02f02ea43b395.tar.gz |
Hob: Remove duplication for certain bitbake variables
Sometimes, certain variables have duplicated values inside, for example,
IMAGE_FSTYPES = "tar.bz2 ext3 tar.bz2 ext3"
We need to remove the redundancy for those values.
(Bitbake rev: 98849cf9201239b23bbbe9247db4d6901f0ed905)
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/ui/crumbs/hobeventhandler.py | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py index 3d5df9e6e6..74081dcc84 100644 --- a/bitbake/lib/bb/ui/crumbs/hobeventhandler.py +++ b/bitbake/lib/bb/ui/crumbs/hobeventhandler.py @@ -382,6 +382,13 @@ class HobHandler(gobject.GObject): def reset_build(self): self.build.reset() + def _remove_redundant(self, string): + ret = [] + for i in string.split(): + if i not in ret: + ret.append(i) + return " ".join(ret) + def get_parameters(self): # retrieve the parameters from bitbake params = {} @@ -445,19 +452,19 @@ class HobHandler(gobject.GObject): image_overhead_factor = float(image_overhead_factor) params['image_overhead_factor'] = image_overhead_factor - params["incompat_license"] = self.server.runCommand(["getVariable", "INCOMPATIBLE_LICENSE"]) or "" + params["incompat_license"] = self._remove_redundant(self.server.runCommand(["getVariable", "INCOMPATIBLE_LICENSE"]) or "") params["sdk_machine"] = self.server.runCommand(["getVariable", "SDKMACHINE"]) or self.server.runCommand(["getVariable", "SDK_ARCH"]) or "" - params["image_fstypes"] = self.server.runCommand(["getVariable", "IMAGE_FSTYPES"]) or "" + params["image_fstypes"] = self._remove_redundant(self.server.runCommand(["getVariable", "IMAGE_FSTYPES"]) or "") - params["image_types"] = self.server.runCommand(["getVariable", "IMAGE_TYPES"]) or "" + params["image_types"] = self._remove_redundant(self.server.runCommand(["getVariable", "IMAGE_TYPES"]) or "") params["conf_version"] = self.server.runCommand(["getVariable", "CONF_VERSION"]) or "" params["lconf_version"] = self.server.runCommand(["getVariable", "LCONF_VERSION"]) or "" - params["runnable_image_types"] = self.server.runCommand(["getVariable", "RUNNABLE_IMAGE_TYPES"]) or "" - params["runnable_machine_patterns"] = self.server.runCommand(["getVariable", "RUNNABLE_MACHINE_PATTERNS"]) or "" - params["deployable_image_types"] = self.server.runCommand(["getVariable", "DEPLOYABLE_IMAGE_TYPES"]) or "" + params["runnable_image_types"] = self._remove_redundant(self.server.runCommand(["getVariable", "RUNNABLE_IMAGE_TYPES"]) or "") + params["runnable_machine_patterns"] = self._remove_redundant(self.server.runCommand(["getVariable", "RUNNABLE_MACHINE_PATTERNS"]) or "") + params["deployable_image_types"] = self._remove_redundant(self.server.runCommand(["getVariable", "DEPLOYABLE_IMAGE_TYPES"]) or "") params["tmpdir"] = self.server.runCommand(["getVariable", "TMPDIR"]) or "" params["distro_version"] = self.server.runCommand(["getVariable", "DISTRO_VERSION"]) or "" params["target_os"] = self.server.runCommand(["getVariable", "TARGET_OS"]) or "" |