Bug 3640 - sanity.bbclass sometimes failing to find saved_tmpdir when tmp-eglibc was deleted
Summary: sanity.bbclass sometimes failing to find saved_tmpdir when tmp-eglibc was del...
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: configuration (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.4
Assignee: Richard Purdie
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2012-12-25 09:29 UTC by Martin Jansa
Modified: 2013-01-24 23:21 UTC (History)
1 user (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Jansa 2012-12-25 09:29:17 UTC
When rebuilding from scratch or sstate-cache, first build often (maybe always) fails to find saved_tmpdir. Then it builds only pseudo-native and quits:

+ bitbake -k world
Pseudo is not present but is required, building this first before the main build
ERROR: Execution of event handler 'check_sanity_eventhandler' failed
Traceback (most recent call last):
  File "check_sanity_eventhandler(e)", line 4, in check_sanity_eventhandler(e=<bb.event.ConfigParsed object at 0x2193950>)
  File "sanity.bbclass", line 230, in check_sanity(sanity_data=<bb.data_smart.DataSmart object at 0x20a5150>)
IOError: [Errno 2] No such file or directory: '/home/jenkins/shr/shr-core-branches/shr-core/tmp-eglibc/saved_tmpdir'

NOTE: PRServer: started! DBfile: /home/jenkins/shr/shr-core-branches/shr-core/cache/prserv.sqlite3, IP: 127.0.0.1, PORT: 41554, PID: 18885
Parsing recipes...done.
Parsing of 1722 .bb files complete (0 cached, 1722 parsed). 2096 targets, 67 skipped, 0 masked, 0 errors.

Build Configuration:
BB_VERSION        = "1.17.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "Ubuntu-12.04"
TARGET_SYS        = "arm-oe-linux-gnueabi"
MACHINE           = "qemuarm"
DISTRO_VERSION    = "oe-core.0"
TUNE_FEATURES     = "armv5 thumb dsp"
TARGET_FPU        = "soft"
meta-shr          
meta-aurora       
meta-fso          
meta-android      = "jansa/test:d085e184a09e4970e18b161c6729a8124dbc78ad"
meta-oe           
meta-efl          
meta-gnome        
meta-gpe          
meta-multimedia   
meta-networking   
meta-systemd      = "jansa/test:39607d18776bb1491aa3bdd391cd7dcf70282bec"
meta-osmocombb    
meta-nokia        
meta-htc          
meta-palm         
meta-openmoko     
meta-samsung      = "jansa/test:d085e184a09e4970e18b161c6729a8124dbc78ad"
meta-browser      = "jansa/test:8299a092bbdc3e656c8a622d51e313c8766df44f"
meta              = "jansa/test:3b5be87e5a0b292e39e918cb36a160d7eef94452"

NOTE: Resolving any missing task queue dependencies
NOTE: Preparing runqueue
NOTE: Executing SetScene Tasks
NOTE: Running setscene task 1 of 9 (virtual:native:/home/jenkins/shr/shr-core-branches/shr-core/openembedded-core/meta/recipes-devtools/pseudo/pseudo_1.4.1.bb, do_populate_sysroot_setscene)
NOTE: recipe pseudo-native-1.4.1-r13: task do_populate_sysroot_setscene: Started
NOTE: recipe pseudo-native-1.4.1-r13: task do_populate_sysroot_setscene: Succeeded
NOTE: Running setscene task 2 of 9 (virtual:native:/home/jenkins/shr/shr-core-branches/shr-core/openembedded-core/meta/recipes-support/sqlite/sqlite3_3.7.15.0.bb, do_populate_sysroot_setscene)
NOTE: recipe sqlite3-native-3.7.15.0-r0: task do_populate_sysroot_setscene: Started
NOTE: recipe sqlite3-native-3.7.15.0-r0: task do_populate_sysroot_setscene: Succeeded
NOTE: Executing RunQueue Tasks
NOTE: Tasks Summary: Attempted 63 tasks of which 63 didn't need to be rerun and all succeeded.

Summary: There was 1 ERROR message shown, returning a non-zero exit code.
NOTE: PRServer: stopping...
Comment 1 Richard Purdie 2013-01-21 13:58:43 UTC
Martin, can you see if this resolves it:

diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index 0ffa52d..8ca0b68 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -571,6 +571,7 @@ def check_sanity(sanity_data):
             messages = messages + "Error, TMPDIR has changed location. You need to either move it back to %s or rebuild\n" % saved_tmpdir
     else:
         f = file(checkfile, "w")
+        bb.utils.mkdirhier(tmpdir)
         f.write(tmpdir)
     f.close()
Comment 2 Martin Jansa 2013-01-23 11:20:08 UTC
(In reply to comment #1)
> Martin, can you see if this resolves it:
> 
> diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
> index 0ffa52d..8ca0b68 100644
> --- a/meta/classes/sanity.bbclass
> +++ b/meta/classes/sanity.bbclass
> @@ -571,6 +571,7 @@ def check_sanity(sanity_data):
>              messages = messages + "Error, TMPDIR has changed location. You
> need to either move it back to %s or rebuild\n" % saved_tmpdir
>      else:
>          f = file(checkfile, "w")
> +        bb.utils.mkdirhier(tmpdir)
>          f.write(tmpdir)
>      f.close()

Fails the same.

Works fine if you move that mkdirhier above 'f = file(checkfile, "w")'.
Comment 4 Richard Purdie 2013-01-24 23:21:41 UTC
Mask as resolved