BUGFIX: make oeread usable again.
[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                 print k,'=',oe.data.expand(oefile[k]['content'], oefile)
27 else:   
28         print "Variables in conf/oe.conf & friends:"
29         for k in cfgkeys:
30                 print "%-30s %s" % (k, cfg[k])
31