diff options
author | Chris Larson <chris_larson@mentor.com> | 2010-04-20 11:53:31 -0700 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-07-02 15:41:34 +0100 |
commit | c3eae29efa2318ee4f12b1e1c8d562e18d1cee87 (patch) | |
tree | 66adc15f52ffd35621389d9de05df3adf76a1f90 /bitbake | |
parent | 214d1f7433fd8571c3e0920624ce07f31c7f08c9 (diff) | |
download | poky-c3eae29efa2318ee4f12b1e1c8d562e18d1cee87.tar.gz |
Don't try to expand non-string values
(Bitbake rev: fe36a726b9f930bbd6fd758c0aee78559e95f02b)
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/build.py | 28 | ||||
-rw-r--r-- | bitbake/lib/bb/cache.py | 8 | ||||
-rw-r--r-- | bitbake/lib/bb/cooker.py | 2 | ||||
-rw-r--r-- | bitbake/lib/bb/parse/parse_py/BBHandler.py | 2 |
4 files changed, 21 insertions, 19 deletions
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py index 4f14e63ac7..1b1775f9db 100644 --- a/bitbake/lib/bb/build.py +++ b/bitbake/lib/bb/build.py | |||
@@ -99,18 +99,19 @@ def exec_func(func, d, dirs = None): | |||
99 | 99 | ||
100 | ispython = flags['python'] | 100 | ispython = flags['python'] |
101 | 101 | ||
102 | cleandirs = (data.expand(flags['cleandirs'], d) or "").split() | 102 | cleandirs = flags['cleandirs'] |
103 | for cdir in cleandirs: | 103 | if cleandirs: |
104 | os.system("rm -rf %s" % cdir) | 104 | for cdir in data.expand(cleandirs, d).split(): |
105 | os.system("rm -rf %s" % cdir) | ||
105 | 106 | ||
106 | if dirs: | 107 | if dirs is None: |
107 | dirs = data.expand(dirs, d) | 108 | dirs = flags['dirs'] |
108 | else: | 109 | if dirs: |
109 | dirs = (data.expand(flags['dirs'], d) or "").split() | 110 | dirs = data.expand(dirs, d).split() |
110 | for adir in dirs: | ||
111 | bb.utils.mkdirhier(adir) | ||
112 | 111 | ||
113 | if len(dirs) > 0: | 112 | if dirs: |
113 | for adir in dirs: | ||
114 | bb.utils.mkdirhier(adir) | ||
114 | adir = dirs[-1] | 115 | adir = dirs[-1] |
115 | else: | 116 | else: |
116 | adir = data.getVar('B', d, 1) | 117 | adir = data.getVar('B', d, 1) |
@@ -157,9 +158,10 @@ def exec_func(func, d, dirs = None): | |||
157 | os.dup2(se.fileno(), ose[1]) | 158 | os.dup2(se.fileno(), ose[1]) |
158 | 159 | ||
159 | locks = [] | 160 | locks = [] |
160 | lockfiles = (data.expand(flags['lockfiles'], d) or "").split() | 161 | lockfiles = flags['lockfiles'] |
161 | for lock in lockfiles: | 162 | if lockfiles: |
162 | locks.append(bb.utils.lockfile(lock)) | 163 | for lock in data.expand(lockfiles, d).split(): |
164 | locks.append(bb.utils.lockfile(lock)) | ||
163 | 165 | ||
164 | try: | 166 | try: |
165 | # Run the function | 167 | # Run the function |
diff --git a/bitbake/lib/bb/cache.py b/bitbake/lib/bb/cache.py index 6e124b2e83..1d592a42f1 100644 --- a/bitbake/lib/bb/cache.py +++ b/bitbake/lib/bb/cache.py | |||
@@ -72,7 +72,7 @@ class Cache: | |||
72 | # If any of configuration.data's dependencies are newer than the | 72 | # If any of configuration.data's dependencies are newer than the |
73 | # cache there isn't even any point in loading it... | 73 | # cache there isn't even any point in loading it... |
74 | newest_mtime = 0 | 74 | newest_mtime = 0 |
75 | deps = bb.data.getVar("__depends", data, True) | 75 | deps = bb.data.getVar("__depends", data) |
76 | for f, old_mtime in deps: | 76 | for f, old_mtime in deps: |
77 | if old_mtime > newest_mtime: | 77 | if old_mtime > newest_mtime: |
78 | newest_mtime = old_mtime | 78 | newest_mtime = old_mtime |
@@ -136,7 +136,7 @@ class Cache: | |||
136 | # Make sure __depends makes the depends_cache | 136 | # Make sure __depends makes the depends_cache |
137 | # If we're a virtual class we need to make sure all our depends are appended | 137 | # If we're a virtual class we need to make sure all our depends are appended |
138 | # to the depends of fn. | 138 | # to the depends of fn. |
139 | depends = self.getVar("__depends", virtualfn, True) or [] | 139 | depends = self.getVar("__depends", virtualfn) or [] |
140 | self.depends_cache.setdefault(fn, {}) | 140 | self.depends_cache.setdefault(fn, {}) |
141 | if "__depends" not in self.depends_cache[fn] or not self.depends_cache[fn]["__depends"]: | 141 | if "__depends" not in self.depends_cache[fn] or not self.depends_cache[fn]["__depends"]: |
142 | self.depends_cache[fn]["__depends"] = depends | 142 | self.depends_cache[fn]["__depends"] = depends |
@@ -218,7 +218,7 @@ class Cache: | |||
218 | for data in bb_data: | 218 | for data in bb_data: |
219 | virtualfn = self.realfn2virtual(fn, data) | 219 | virtualfn = self.realfn2virtual(fn, data) |
220 | self.setData(virtualfn, fn, bb_data[data]) | 220 | self.setData(virtualfn, fn, bb_data[data]) |
221 | if self.getVar("__SKIPPED", virtualfn, True): | 221 | if self.getVar("__SKIPPED", virtualfn): |
222 | skipped += 1 | 222 | skipped += 1 |
223 | bb.msg.debug(1, bb.msg.domain.Cache, "Skipping %s" % virtualfn) | 223 | bb.msg.debug(1, bb.msg.domain.Cache, "Skipping %s" % virtualfn) |
224 | else: | 224 | else: |
@@ -361,7 +361,7 @@ class Cache: | |||
361 | packages_dynamic = (self.getVar('PACKAGES_DYNAMIC', file_name, True) or "").split() | 361 | packages_dynamic = (self.getVar('PACKAGES_DYNAMIC', file_name, True) or "").split() |
362 | rprovides = (self.getVar("RPROVIDES", file_name, True) or "").split() | 362 | rprovides = (self.getVar("RPROVIDES", file_name, True) or "").split() |
363 | 363 | ||
364 | cacheData.task_deps[file_name] = self.getVar("_task_deps", file_name, True) | 364 | cacheData.task_deps[file_name] = self.getVar("_task_deps", file_name) |
365 | 365 | ||
366 | # build PackageName to FileName lookup table | 366 | # build PackageName to FileName lookup table |
367 | if pn not in cacheData.pkg_pn: | 367 | if pn not in cacheData.pkg_pn: |
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index 613654db85..96fdb66270 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py | |||
@@ -567,7 +567,7 @@ class BBCooker: | |||
567 | 567 | ||
568 | # Nomally we only register event handlers at the end of parsing .bb files | 568 | # Nomally we only register event handlers at the end of parsing .bb files |
569 | # We register any handlers we've found so far here... | 569 | # We register any handlers we've found so far here... |
570 | for var in data.getVar('__BBHANDLERS', self.configuration.data) or []: | 570 | for var in bb.data.getVar('__BBHANDLERS', self.configuration.data) or []: |
571 | bb.event.register(var, bb.data.getVar(var, self.configuration.data)) | 571 | bb.event.register(var, bb.data.getVar(var, self.configuration.data)) |
572 | 572 | ||
573 | bb.fetch.fetcher_init(self.configuration.data) | 573 | bb.fetch.fetcher_init(self.configuration.data) |
diff --git a/bitbake/lib/bb/parse/parse_py/BBHandler.py b/bitbake/lib/bb/parse/parse_py/BBHandler.py index a388773bb7..52fd8285ed 100644 --- a/bitbake/lib/bb/parse/parse_py/BBHandler.py +++ b/bitbake/lib/bb/parse/parse_py/BBHandler.py | |||
@@ -68,8 +68,8 @@ def inherit(files, d): | |||
68 | __inherit_cache = data.getVar('__inherit_cache', d) or [] | 68 | __inherit_cache = data.getVar('__inherit_cache', d) or [] |
69 | fn = "" | 69 | fn = "" |
70 | lineno = 0 | 70 | lineno = 0 |
71 | files = data.expand(files, d) | ||
72 | for file in files: | 71 | for file in files: |
72 | file = data.expand(file, d) | ||
73 | if file[0] != "/" and file[-8:] != ".bbclass": | 73 | if file[0] != "/" and file[-8:] != ".bbclass": |
74 | file = os.path.join('classes', '%s.bbclass' % file) | 74 | file = os.path.join('classes', '%s.bbclass' % file) |
75 | 75 | ||