Show filename of log when displaying it, on failure.
[vuplus_bitbake] / bin / oeread
1 #!/usr/bin/env python
2 # ex:ts=4:sw=4:sts=4:et
3 # -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
4
5 import sys, copy, oe, oe.parse, oe.build
6 #from oe import *
7
8 cfg = {}
9 cfg = oe.parse.handle("conf/oe.conf", cfg)
10
11 cfgkeys = cfg.keys()
12 cfgkeys.sort()
13
14 if len(sys.argv) == 2:
15     oefile = copy.deepcopy(cfg)
16     try:
17         oefile = oe.parse.handle(sys.argv[1], oefile)
18     except Exception, e:
19         oe.fatal("%s" % e)
20     oefilekeys = oefile.keys()
21     oefilekeys.sort()
22     print "Variables in %s:" % sys.argv[1]
23     for k in oefilekeys:
24         if k.startswith('base_'): continue
25         if k.startswith('FILES_'): continue
26         if k.startswith('do_'): continue
27         if k.startswith('oe'): continue
28         if k in cfg:
29             if cfg[k] == oefile[k]:
30                 continue
31         if 'content' in oefile[k]:
32             print k,'=',oe.data.expand(oefile[k]['content'], oefile)
33 else:
34     print "Variables in conf/oe.conf & friends:"
35     for k in cfgkeys:
36         print "%-30s %s" % (k, cfg[k])
37