diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-01-06 15:41:39 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-01-06 22:17:01 +0000 |
commit | cf37932ad689ebb8f9008df38b18ea54a73132b3 (patch) | |
tree | f475c73fcd32aa251de0371e8e9649a222d18454 /lib/bb/build.py | |
parent | 9615c538b894f71a2d1a0ba6b3f260db91e75786 (diff) | |
download | bitbake-cf37932ad689ebb8f9008df38b18ea54a73132b3.tar.gz |
bitbake/build.py: Ditch the extract_stamp function as its just going to complicate improving the stamp handling functions
(From Poky rev: 51a2e8712a9b94de53253e198c64c0fa428e4349)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/build.py')
-rw-r--r-- | lib/bb/build.py | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/lib/bb/build.py b/lib/bb/build.py index 21497fcd4..29d91256c 100644 --- a/lib/bb/build.py +++ b/lib/bb/build.py @@ -308,25 +308,24 @@ def exec_task(fn, task, d): if not d.getVarFlag(task, 'nostamp') and not d.getVarFlag(task, 'selfstamp'): make_stamp(task, d) -def extract_stamp(d, fn): - """ - Extracts stamp format which is either a data dictionary (fn unset) - or a dataCache entry (fn set). - """ - if fn: - return d.stamp[fn] - return data.getVar('STAMP', d, 1) - def stamp_internal(task, d, file_name): """ Internal stamp helper function Removes any stamp for the given task Makes sure the stamp directory exists Returns the stamp path+filename + + In the bitbake core, d can be a CacheData and file_name will be set. + When called in task context, d will be a data store, file_name will not be set """ - stamp = extract_stamp(d, file_name) + if file_name: + stamp = d.stamp[file_name] + else: + stamp = d.getVar('STAMP', True) + if not stamp: return + stamp = "%s.%s" % (stamp, task) bb.utils.mkdirhier(os.path.dirname(stamp)) # Remove the file and recreate to force timestamp |