[bitbake-devel] [PATCH 0/1] Fix TOCTOU issue with sstate mirror

Tyler Hall tylerwhall at gmail.com
Sat Aug 9 22:46:19 UTC 2014


When attempting to use sstate from a mirror, the siginfo file will be checked
twice: first when deciding whether to run the setscene task and again while
fetching in the setscene task. If the file is removed from the mirror between
those two checks, the setscene task will run and fail. This is acceptable since
since the real task will be run instead, but currently the fetcher will emit an
error message which causes bitbake to return a nonzero exit code. The build
completes successfully but appears to have failed.

This race has occurred several times in practice when using an http sstate
server that periodically prunes old files.

The simple fix provided here is to downgrade the internal fetcher error message
to a warning and let the do_fetch task continue to generate its error level
message.

This is one of two paches. First openembedded-core must be patched to ignore
the "Error:" prefix when scraping the log for this message. Then bitbake's log
level can change.

Tyler Hall (1):
  fetch2: Downgrade the fetch failure log to a warning

 lib/bb/fetch2/__init__.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.0.3




More information about the bitbake-devel mailing list