]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bitbake-layers: fix duplicated help info
authorRobert Yang <liezhi.yang@windriver.com>
Wed, 6 Mar 2013 05:36:23 +0000 (13:36 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 9 Mar 2013 05:17:42 +0000 (05:17 +0000)
There are two "help" lines when run bitbake help under python 2.6.6
(perhaps all python 2.6):

$ bitbake-layers help
[snip]
help
    display general help or help on a specified command
[snip]
help
    display general help or help on a specified command

This is because the cmd.py in python 2.6.6 also has a do_help() function
as our bitbake-layers, and the cmd.Cmd.get_names() doesn't consider the
overload, this has been fixed in python 2.7, use set() to remove the
duplicated would fix the problem.

[YOCTO #3428]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bin/bitbake-layers

index b48590f9361c85a11539d7fb366aa7d8558f2c1b..86da2689e6a6e95914e8b40e0f6a4098c7063c2d 100755 (executable)
@@ -73,7 +73,7 @@ class Commands(cmd.Cmd):
         else:
             sys.stdout.write("usage: bitbake-layers <command> [arguments]\n\n")
             sys.stdout.write("Available commands:\n")
-            procnames = self.get_names()
+            procnames = list(set(self.get_names()))
             for procname in procnames:
                 if procname[:3] == 'do_':
                     sys.stdout.write("  %s\n" % procname[3:].replace('_', '-'))