diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-11-19 15:01:20 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-11-20 15:31:56 +0000 |
commit | 5de7744a49bc0523fd65356638457bc51e1b262f (patch) | |
tree | 17e82ea482dc038f2bd620a6b786357cbba6d6f2 /bitbake/lib/bb/parse | |
parent | e10bea36ac0783ac8d184c2c3b3ce729f2d66b20 (diff) | |
download | poky-5de7744a49bc0523fd65356638457bc51e1b262f.tar.gz |
bitbake: 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.
(Bitbake rev: a44285fc4109236ab89f7aad0a1fc9220eec19b6)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/parse')
-rw-r--r-- | bitbake/lib/bb/parse/__init__.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/bitbake/lib/bb/parse/__init__.py b/bitbake/lib/bb/parse/__init__.py index 7b9c47e616..4293d09c7a 100644 --- a/bitbake/lib/bb/parse/__init__.py +++ b/bitbake/lib/bb/parse/__init__.py | |||
@@ -73,8 +73,7 @@ def update_mtime(f): | |||
73 | def mark_dependency(d, f): | 73 | def mark_dependency(d, f): |
74 | if f.startswith('./'): | 74 | if f.startswith('./'): |
75 | f = "%s/%s" % (os.getcwd(), f[2:]) | 75 | f = "%s/%s" % (os.getcwd(), f[2:]) |
76 | deps = d.getVar('__depends') or set() | 76 | deps = (d.getVar('__depends') or []) + [(f, cached_mtime(f))] |
77 | deps.update([(f, cached_mtime(f))]) | ||
78 | d.setVar('__depends', deps) | 77 | d.setVar('__depends', deps) |
79 | 78 | ||
80 | def supports(fn, data): | 79 | def supports(fn, data): |
@@ -134,8 +133,8 @@ def vars_from_file(mypkg, d): | |||
134 | def get_file_depends(d): | 133 | def get_file_depends(d): |
135 | '''Return the dependent files''' | 134 | '''Return the dependent files''' |
136 | dep_files = [] | 135 | dep_files = [] |
137 | depends = d.getVar('__depends', True) or set() | 136 | depends = d.getVar('__base_depends', True) or [] |
138 | depends = depends.union(d.getVar('__base_depends', True) or set()) | 137 | depends = depends + (d.getVar('__depends', True) or []) |
139 | for (fn, _) in depends: | 138 | for (fn, _) in depends: |
140 | dep_files.append(os.path.abspath(fn)) | 139 | dep_files.append(os.path.abspath(fn)) |
141 | return " ".join(dep_files) | 140 | return " ".join(dep_files) |