diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2011-07-22 18:17:39 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-07-25 12:54:17 +0100 |
commit | d7e17ee92fb1ebcfe250668f7b4001c6a74a33ca (patch) | |
tree | 5c5e42036d2b32f0972420daafeedf93c9c01347 /bitbake | |
parent | 27edc7c1a906e38376054ad2a362ae213a45ba1b (diff) | |
download | poky-d7e17ee92fb1ebcfe250668f7b4001c6a74a33ca.tar.gz |
bitbake-layers: add command help
If you run "bitbake-layers help commandname" it now provides some useful
help text.
(Bitbake rev: 1548edcd18a78bab74cde39167169f11ba3c4d58)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rwxr-xr-x | bitbake/bin/bitbake-layers | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/bitbake/bin/bitbake-layers b/bitbake/bin/bitbake-layers index 56253f5d28..746d79ddec 100755 --- a/bitbake/bin/bitbake-layers +++ b/bitbake/bin/bitbake-layers | |||
@@ -76,10 +76,18 @@ class Commands(cmd.Cmd): | |||
76 | self.prepare_cooker() | 76 | self.prepare_cooker() |
77 | 77 | ||
78 | def do_show_layers(self, args): | 78 | def do_show_layers(self, args): |
79 | """show_layers: shows current configured layers""" | ||
79 | self.check_prepare_cooker() | 80 | self.check_prepare_cooker() |
80 | logger.info(str(self.config_data.getVar('BBLAYERS', True))) | 81 | logger.info(str(self.config_data.getVar('BBLAYERS', True))) |
81 | 82 | ||
82 | def do_show_overlayed(self, args): | 83 | def do_show_overlayed(self, args): |
84 | """show_overlayed: list overlayed recipes (where there is a recipe in another | ||
85 | layer that has a higher layer priority) | ||
86 | |||
87 | syntax: show_overlayed | ||
88 | |||
89 | Highest priority recipes are listed with the recipes they overlay as subitems. | ||
90 | """ | ||
83 | self.check_prepare_cooker() | 91 | self.check_prepare_cooker() |
84 | if self.cooker.overlayed: | 92 | if self.cooker.overlayed: |
85 | logger.info('Overlayed recipes:') | 93 | logger.info('Overlayed recipes:') |
@@ -91,9 +99,25 @@ class Commands(cmd.Cmd): | |||
91 | logger.info('No overlayed recipes found') | 99 | logger.info('No overlayed recipes found') |
92 | 100 | ||
93 | def do_flatten(self, args): | 101 | def do_flatten(self, args): |
102 | """flatten: flattens layer configuration into a separate output directory. | ||
103 | |||
104 | syntax: flatten <outputdir> | ||
105 | |||
106 | Takes the current layer configuration and builds a "flattened" directory | ||
107 | containing the contents of all layers, with any overlayed recipes removed | ||
108 | and bbappends appended to the corresponding recipes. Note that some manual | ||
109 | cleanup may still be necessary afterwards, in particular: | ||
110 | |||
111 | * where non-recipe files (such as patches) are overwritten (the flatten | ||
112 | command will show a warning for these) | ||
113 | * where anything beyond the normal layer setup has been added to | ||
114 | layer.conf (only the lowest priority layer's layer.conf is used) | ||
115 | * overridden/appended items from bbappends will need to be tidied up | ||
116 | """ | ||
94 | arglist = args.split() | 117 | arglist = args.split() |
95 | if len(arglist) != 1: | 118 | if len(arglist) != 1: |
96 | logger.error('syntax: flatten <outputdir>') | 119 | logger.error('Please specify an output directory') |
120 | self.do_help('flatten') | ||
97 | return | 121 | return |
98 | 122 | ||
99 | if os.path.exists(arglist[0]) and os.listdir(arglist[0]): | 123 | if os.path.exists(arglist[0]) and os.listdir(arglist[0]): |
@@ -150,6 +174,12 @@ class Commands(cmd.Cmd): | |||
150 | recipefile.writelines(appendfile.readlines()) | 174 | recipefile.writelines(appendfile.readlines()) |
151 | 175 | ||
152 | def do_show_appends(self, args): | 176 | def do_show_appends(self, args): |
177 | """show_appends: List bbappend files and recipe files they apply to | ||
178 | |||
179 | syntax: show_appends | ||
180 | |||
181 | Recipes are listed with the bbappends that apply to them as subitems. | ||
182 | """ | ||
153 | self.check_prepare_cooker() | 183 | self.check_prepare_cooker() |
154 | if not self.cooker_data.appends: | 184 | if not self.cooker_data.appends: |
155 | logger.info('No append files found') | 185 | logger.info('No append files found') |