summaryrefslogtreecommitdiffstats
path: root/lib/bb/parse/__init__.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-11-19 15:01:20 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-11-19 15:45:49 +0000
commita44285fc4109236ab89f7aad0a1fc9220eec19b6 (patch)
treecdd7eff64d14e35a2d2b02ad158762c4ca17b4b7 /lib/bb/parse/__init__.py
parenta098cebd5c33ebd704efd35d9e655262283cbe1f (diff)
downloadbitbake-contrib-a44285fc4109236ab89f7aad0a1fc9220eec19b6.tar.gz
parse/cache/cooker: Preserve order in the file inclusion list
The data returned by get_file_depends() may me used in contexts like checksums where order is important. The current usage of sets means that some of the checksums can change in circumstances they should not. This patch changes to use lists, thereby removing the problem. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/parse/__init__.py')
-rw-r--r--lib/bb/parse/__init__.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/bb/parse/__init__.py b/lib/bb/parse/__init__.py
index 7b9c47e61..4293d09c7 100644
--- a/lib/bb/parse/__init__.py
+++ b/lib/bb/parse/__init__.py
@@ -73,8 +73,7 @@ def update_mtime(f):
def mark_dependency(d, f):
if f.startswith('./'):
f = "%s/%s" % (os.getcwd(), f[2:])
- deps = d.getVar('__depends') or set()
- deps.update([(f, cached_mtime(f))])
+ deps = (d.getVar('__depends') or []) + [(f, cached_mtime(f))]
d.setVar('__depends', deps)
def supports(fn, data):
@@ -134,8 +133,8 @@ def vars_from_file(mypkg, d):
def get_file_depends(d):
'''Return the dependent files'''
dep_files = []
- depends = d.getVar('__depends', True) or set()
- depends = depends.union(d.getVar('__base_depends', True) or set())
+ depends = d.getVar('__base_depends', True) or []
+ depends = depends + (d.getVar('__depends', True) or [])
for (fn, _) in depends:
dep_files.append(os.path.abspath(fn))
return " ".join(dep_files)