summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Larson <clarson@kergoth.com>2004-10-27 18:51:58 +0000
committerChris Larson <clarson@kergoth.com>2004-10-27 18:51:58 +0000
commit5c0dbde5161d9819a1e3e617cdd8ee71d31b0c7d (patch)
treee13ea97dd036c540336ae5d3a4dc8ac8d0b57fa1
parent0599b6f7bec334d775a04ee348ae7be66cc289d8 (diff)
downloadbitbake-contrib-5c0dbde5161d9819a1e3e617cdd8ee71d31b0c7d.tar.gz
Call oe.data.init() rather than manually initializing the dictionary.
-rw-r--r--bin/oe/make.py10
-rw-r--r--bin/oemake2
-rw-r--r--bin/oeread2
3 files changed, 7 insertions, 7 deletions
diff --git a/bin/oe/make.py b/bin/oe/make.py
index d2f3df420..df4c1e8ed 100644
--- a/bin/oe/make.py
+++ b/bin/oe/make.py
@@ -18,7 +18,7 @@ except ImportError:
print "NOTE: Importing cPickle failed. Falling back to a very slow implementation."
pkgdata = {}
-cfg = {}
+cfg = data.init()
cache = None
digits = "0123456789"
ascii_letters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
@@ -58,7 +58,7 @@ def deps_clean(d):
def load_oefile( oefile ):
"""Load and parse one .oe build file"""
- if cache is not None:
+ if not cache in [None, '']:
cache_oefile = oefile.replace( '/', '_' )
try:
@@ -88,7 +88,7 @@ def load_oefile( oefile ):
# expand tmpdir to include this topdir
data.setVar('TMPDIR', data.getVar('TMPDIR', cfg, 1) or "", cfg)
# add topdir to oepath
- oepath = "%s:%s" % (topdir, oepath)
+ # oepath = "%s:%s" % (topdir, oepath)
# set topdir to location of .oe file
topdir = oefile_loc
#data.setVar('TOPDIR', topdir, cfg)
@@ -101,7 +101,7 @@ def load_oefile( oefile ):
oe = copy.deepcopy(cfg)
try:
parse.handle(oefile, oe) # read .oe data
- if cache is not None: pickle_oe( cache_oefile, oe) # write cache
+ if not cache in [None, '']: pickle_oe( cache_oefile, oe) # write cache
os.chdir(oldpath)
return oe, False
finally:
@@ -127,7 +127,7 @@ def collect_oefiles( progressCallback ):
parsed, cached, skipped, masked = 0, 0, 0, 0
global cache
cache = oe.data.getVar( "CACHE", cfg, 1 )
- if cache is not None:
+ if not cache in [None, '']:
print "NOTE: Using cache in '%s'" % cache
try:
os.stat( cache )
diff --git a/bin/oemake b/bin/oemake
index 3f3248df0..fa22f38eb 100644
--- a/bin/oemake
+++ b/bin/oemake
@@ -436,7 +436,7 @@ if __name__ == "__main__":
__depcmd=make.options.cmd
make.pkgdata = {}
- make.cfg = {}
+ make.cfg = oe.data.init()
providers = {}
for f in make.options.file:
diff --git a/bin/oeread b/bin/oeread
index 7fc8d0fa1..d047e0b02 100644
--- a/bin/oeread
+++ b/bin/oeread
@@ -5,7 +5,7 @@
import sys, copy, oe, oe.parse, oe.build
#from oe import *
-d = {}
+d = oe.data.init()
d = oe.parse.handle("conf/oe.conf", d)
if len(sys.argv) == 2: