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 15:41:39 +0000 |
commit | 51a2e8712a9b94de53253e198c64c0fa428e4349 (patch) | |
tree | c17501b76a6d72a681ccf2dc3362112a126de854 | |
parent | 37391f667f0ccb47740243de77e14d60b0797280 (diff) | |
download | poky-51a2e8712a9b94de53253e198c64c0fa428e4349.tar.gz |
bitbake/build.py: Ditch the extract_stamp function as its just going to complicate improving the stamp handling functions
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | bitbake/lib/bb/build.py | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/bitbake/lib/bb/build.py b/bitbake/lib/bb/build.py index 2d8fe8be84..38dab5ff1e 100644 --- a/bitbake/lib/bb/build.py +++ b/bitbake/lib/bb/build.py | |||
@@ -373,25 +373,24 @@ def exec_task(fn, task, d): | |||
373 | event.fire(failedevent, d) | 373 | event.fire(failedevent, d) |
374 | return 1 | 374 | return 1 |
375 | 375 | ||
376 | def extract_stamp(d, fn): | ||
377 | """ | ||
378 | Extracts stamp format which is either a data dictionary (fn unset) | ||
379 | or a dataCache entry (fn set). | ||
380 | """ | ||
381 | if fn: | ||
382 | return d.stamp[fn] | ||
383 | return data.getVar('STAMP', d, 1) | ||
384 | |||
385 | def stamp_internal(task, d, file_name): | 376 | def stamp_internal(task, d, file_name): |
386 | """ | 377 | """ |
387 | Internal stamp helper function | 378 | Internal stamp helper function |
388 | Removes any stamp for the given task | 379 | Removes any stamp for the given task |
389 | Makes sure the stamp directory exists | 380 | Makes sure the stamp directory exists |
390 | Returns the stamp path+filename | 381 | Returns the stamp path+filename |
382 | |||
383 | In the bitbake core, d can be a CacheData and file_name will be set. | ||
384 | When called in task context, d will be a data store, file_name will not be set | ||
391 | """ | 385 | """ |
392 | stamp = extract_stamp(d, file_name) | 386 | if file_name: |
387 | stamp = d.stamp[file_name] | ||
388 | else: | ||
389 | stamp = d.getVar('STAMP', True) | ||
390 | |||
393 | if not stamp: | 391 | if not stamp: |
394 | return | 392 | return |
393 | |||
395 | stamp = "%s.%s" % (stamp, task) | 394 | stamp = "%s.%s" % (stamp, task) |
396 | bb.utils.mkdirhier(os.path.dirname(stamp)) | 395 | bb.utils.mkdirhier(os.path.dirname(stamp)) |
397 | # Remove the file and recreate to force timestamp | 396 | # Remove the file and recreate to force timestamp |