Change a few remnant a.has_key(b) users to b in a.
[bitbake.git] / bin / oeread
1 #!/usr/bin/env python
2
3 import sys, copy, oe, oe.parse, oe.build
4 #from oe import *
5
6 cfg = {}
7 cfg = oe.parse.handle("conf/oe.conf", cfg)
8
9 cfgkeys = cfg.keys()
10 cfgkeys.sort()
11
12 if len(sys.argv) == 2:
13         oefile = copy.deepcopy(cfg)
14         oefile = oe.parse.handle(sys.argv[1], oefile)
15         oefilekeys = oefile.keys()
16         oefilekeys.sort()
17         print "Variables in %s:" % sys.argv[1]
18         for k in oefilekeys:
19                 if k.startswith('base_'): continue
20                 if k.startswith('FILES_'): continue
21                 if k.startswith('do_'): continue
22                 if k.startswith('oe'): continue
23                 if k in cfg:
24                         if cfg[k] == oefile[k]:
25                                 continue
26                 if 'content' in oefile[k]:
27                         print k,'=',oe.data.expand(oefile[k]['content'], oefile)
28 else:
29         print "Variables in conf/oe.conf & friends:"
30         for k in cfgkeys:
31                 print "%-30s %s" % (k, cfg[k])
32