summaryrefslogtreecommitdiffstats
path: root/bitbake/bin/bitbake-layers
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2011-08-12 12:09:44 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-08-15 09:49:11 +0100
commit6f32cb2741f4602513fe04f1f45b708f2b7034fb (patch)
treefc680af53da2d900b3ff69131523a953f393576e /bitbake/bin/bitbake-layers
parent6ba1beb76c31c21ded2aa8a7b231a73847c5b1b7 (diff)
downloadpoky-6f32cb2741f4602513fe04f1f45b708f2b7034fb.tar.gz
bitbake-layers: use logger.plain instead of info
The INFO: prefix makes sense in bitbake itself but in bitbake-layers is just noise. Changing this exposed the fact that the logger was not being set up correctly (which should be done anyway to correctly support logging from BitBake), so this has also been fixed. [RP: Sync with logging changes] (Bitbake rev: 79751524cb1f0388975c6228f8c112e6af80f154) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/bin/bitbake-layers')
-rwxr-xr-xbitbake/bin/bitbake-layers34
1 files changed, 20 insertions, 14 deletions
diff --git a/bitbake/bin/bitbake-layers b/bitbake/bin/bitbake-layers
index 2845ae5f2e..9de5bbffcb 100755
--- a/bitbake/bin/bitbake-layers
+++ b/bitbake/bin/bitbake-layers
@@ -24,7 +24,13 @@ logger = logging.getLogger('BitBake')
24 24
25 25
26def main(args): 26def main(args):
27 logging.basicConfig(format='%(levelname)s: %(message)s') 27 # Set up logging
28 console = logging.StreamHandler(sys.stdout)
29 format = bb.msg.BBLogFormatter("%(levelname)s: %(message)s")
30 bb.msg.addDefaultlogFilter(console)
31 console.setFormatter(format)
32 logger.addHandler(console)
33
28 bb.utils.clean_environment() 34 bb.utils.clean_environment()
29 35
30 cmds = Commands() 36 cmds = Commands()
@@ -97,7 +103,7 @@ class Commands(cmd.Cmd):
97 def do_show_layers(self, args): 103 def do_show_layers(self, args):
98 """show current configured layers""" 104 """show current configured layers"""
99 self.check_prepare_cooker() 105 self.check_prepare_cooker()
100 logger.info(str(self.config_data.getVar('BBLAYERS', True))) 106 logger.plain(str(self.config_data.getVar('BBLAYERS', True)))
101 107
102 def do_show_overlayed(self, args): 108 def do_show_overlayed(self, args):
103 """list overlayed recipes (where there is a recipe in another layer that has a higher layer priority) 109 """list overlayed recipes (where there is a recipe in another layer that has a higher layer priority)
@@ -108,13 +114,13 @@ Highest priority recipes are listed with the recipes they overlay as subitems.
108""" 114"""
109 self.check_prepare_cooker() 115 self.check_prepare_cooker()
110 if self.cooker.overlayed: 116 if self.cooker.overlayed:
111 logger.info('Overlayed recipes:') 117 logger.plain('Overlayed recipes:')
112 for f in self.cooker.overlayed.iterkeys(): 118 for f in self.cooker.overlayed.iterkeys():
113 logger.info('%s' % f) 119 logger.plain('%s' % f)
114 for of in self.cooker.overlayed[f]: 120 for of in self.cooker.overlayed[f]:
115 logger.info(' %s' % of) 121 logger.plain(' %s' % of)
116 else: 122 else:
117 logger.info('No overlayed recipes found') 123 logger.plain('No overlayed recipes found')
118 124
119 def do_flatten(self, args): 125 def do_flatten(self, args):
120 """flattens layer configuration into a separate output directory. 126 """flattens layer configuration into a separate output directory.
@@ -151,12 +157,12 @@ cleanup may still be necessary afterwards, in particular:
151 if of.startswith(layer): 157 if of.startswith(layer):
152 overlayed.append(of) 158 overlayed.append(of)
153 159
154 logger.info('Copying files from %s...' % layer ) 160 logger.plain('Copying files from %s...' % layer )
155 for root, dirs, files in os.walk(layer): 161 for root, dirs, files in os.walk(layer):
156 for f1 in files: 162 for f1 in files:
157 f1full = os.sep.join([root, f1]) 163 f1full = os.sep.join([root, f1])
158 if f1full in overlayed: 164 if f1full in overlayed:
159 logger.info(' Skipping overlayed file %s' % f1full ) 165 logger.plain(' Skipping overlayed file %s' % f1full )
160 else: 166 else:
161 ext = os.path.splitext(f1)[1] 167 ext = os.path.splitext(f1)[1]
162 if ext != '.bbappend': 168 if ext != '.bbappend':
@@ -165,7 +171,7 @@ cleanup may still be necessary afterwards, in particular:
165 bb.utils.mkdirhier(os.path.dirname(fdest)) 171 bb.utils.mkdirhier(os.path.dirname(fdest))
166 if os.path.exists(fdest): 172 if os.path.exists(fdest):
167 if f1 == 'layer.conf' and root.endswith('/conf'): 173 if f1 == 'layer.conf' and root.endswith('/conf'):
168 logger.info(' Skipping layer config file %s' % f1full ) 174 logger.plain(' Skipping layer config file %s' % f1full )
169 continue 175 continue
170 else: 176 else:
171 logger.warn('Overwriting file %s', fdest) 177 logger.warn('Overwriting file %s', fdest)
@@ -174,7 +180,7 @@ cleanup may still be necessary afterwards, in particular:
174 if f1 in self.cooker_data.appends: 180 if f1 in self.cooker_data.appends:
175 appends = self.cooker_data.appends[f1] 181 appends = self.cooker_data.appends[f1]
176 if appends: 182 if appends:
177 logger.info(' Applying appends to %s' % fdest ) 183 logger.plain(' Applying appends to %s' % fdest )
178 for appendname in appends: 184 for appendname in appends:
179 self.apply_append(appendname, fdest) 185 self.apply_append(appendname, fdest)
180 186
@@ -200,10 +206,10 @@ Recipes are listed with the bbappends that apply to them as subitems.
200""" 206"""
201 self.check_prepare_cooker() 207 self.check_prepare_cooker()
202 if not self.cooker_data.appends: 208 if not self.cooker_data.appends:
203 logger.info('No append files found') 209 logger.plain('No append files found')
204 return 210 return
205 211
206 logger.info('State of append files:') 212 logger.plain('State of append files:')
207 213
208 pnlist = list(self.cooker_data.pkg_pn.keys()) 214 pnlist = list(self.cooker_data.pkg_pn.keys())
209 pnlist.sort() 215 pnlist.sort()
@@ -232,9 +238,9 @@ Recipes are listed with the bbappends that apply to them as subitems.
232 appended, missing = self.get_appends_for_files(filenames) 238 appended, missing = self.get_appends_for_files(filenames)
233 if appended: 239 if appended:
234 for basename, appends in appended: 240 for basename, appends in appended:
235 logger.info('%s%s:', basename, name_suffix) 241 logger.plain('%s%s:', basename, name_suffix)
236 for append in appends: 242 for append in appends:
237 logger.info(' %s', append) 243 logger.plain(' %s', append)
238 244
239 if best_filename: 245 if best_filename:
240 if best_filename in missing: 246 if best_filename in missing: