[OE-core] [PATCH] devtool: ensure temp directory is created

Joshua Lock joshua.g.lock at intel.com
Tue Oct 17 15:05:06 UTC 2017


We often see nightly-oe-selftest on the Yocto Project Autobuilder fail in
test_devtool_modify_native with:

     'devtool modify apt-native -x /tmp/devtoolqahlptvsfq/apt-native' returned
     non-zero exit status 1

and the following traceback:

Traceback (most recent call last):
  File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/scripts/devtool", line 331, in <module>
    ret = main()
  File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/scripts/devtool", line 318, in main
    ret = args.func(args, config, basepath, workspace)
  File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/scripts/lib/devtool/standard.py", line 714, in modify
    initial_rev = _extract_source(srctree, args.keep_temp, args.branch, False, config, basepath, workspace, args.fixed_setup, rd, tinfoil)
  File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/scripts/lib/devtool/standard.py", line 545, in _extract_source
    with open(os.path.join(tempdir, 'initial_rev'), 'r') as f:

Ensure the tempdir is created before we try and create any files there.

Signed-off-by: Joshua Lock <joshua.g.lock at intel.com>
---
 scripts/lib/devtool/standard.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index beea0d4c274..38197251b42 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -494,6 +494,7 @@ def _extract_source(srctree, keep_temp, devbranch, sync, config, basepath, works
     tempbasedir = d.getVar('WORKDIR')
     bb.utils.mkdirhier(tempbasedir)
     tempdir = tempfile.mkdtemp(prefix='devtooltmp-', dir=tempbasedir)
+    bb.utils.mkdirhier(tempdir)
     try:
         tinfoil.logger.setLevel(logging.WARNING)
 
-- 
2.13.6




More information about the Openembedded-core mailing list