diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/lib/devtool/standard.py | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py index 8944b0a34b..30b247fa74 100644 --- a/scripts/lib/devtool/standard.py +++ b/scripts/lib/devtool/standard.py | |||
@@ -465,7 +465,21 @@ def _extract_source(srctree, keep_temp, devbranch, sync, d, tinfoil): | |||
465 | os.rmdir(srctree) | 465 | os.rmdir(srctree) |
466 | 466 | ||
467 | initial_rev = None | 467 | initial_rev = None |
468 | tempdir = tempfile.mkdtemp(prefix='devtool') | 468 | # We need to redirect WORKDIR, STAMPS_DIR etc. under a temporary |
469 | # directory so that: | ||
470 | # (a) we pick up all files that get unpacked to the WORKDIR, and | ||
471 | # (b) we don't disturb the existing build | ||
472 | # However, with recipe-specific sysroots the sysroots for the recipe | ||
473 | # will be prepared under WORKDIR, and if we used the system temporary | ||
474 | # directory (i.e. usually /tmp) as used by mkdtemp by default, then | ||
475 | # our attempts to hardlink files into the recipe-specific sysroots | ||
476 | # will fail on systems where /tmp is a different filesystem, and it | ||
477 | # would have to fall back to copying the files which is a waste of | ||
478 | # time. Put the temp directory under the WORKDIR to prevent that from | ||
479 | # being a problem. | ||
480 | tempbasedir = d.getVar('WORKDIR') | ||
481 | bb.utils.mkdirhier(tempbasedir) | ||
482 | tempdir = tempfile.mkdtemp(prefix='devtooltmp-', dir=tempbasedir) | ||
469 | try: | 483 | try: |
470 | tinfoil.logger.setLevel(logging.WARNING) | 484 | tinfoil.logger.setLevel(logging.WARNING) |
471 | 485 | ||