Skip to contentSkip to conversation

Initial build broken?

PATCH Holger Freyther 1 participant 1 message Oct 25, 2008

lore
Share & tools
lore
#0 lore raw

Hey guys,

I get a Bitbake exception when I don't have the TMPDIR created. Can anyone confirm this?

I have the following patches to help to see the problem and to cure it. Comments welcome.

I would be happy to apply them.

z.

classes/sanity.bbclass +2 -0
index 7aabe04..b925d05 100644
@@ -131,6 +131,8 @@ def check_sanity(e):
 		if (f.read().strip() != tmpdir):
 			messages = messages + "Error, TMPDIR has changed location. You need to either move it back to %s or rebuild\n" % tmpdir
 	else:
+		import bb
+		bb.mkdirhier(tmpdir)
 		f = file(checkfile, "w")
 		f.write(tmpdir)
 	f.close()

From a36d39903ac0a4a33a46e2a82f389f1b5c2039f2 Mon Sep 17 00:00:00 2001
From: Holger Freyther <[email protected]>
Date: Sat, 25 Oct 2008 16:00:58 +0200
Subject: [PATCH] [error handling] Print the exception if config parsing fails

Print:
Unable to open conf/bitbake.conf ([Errno 2] No such file or directory:
'/home/ich/build/om/neo1973/tmp/saved_tmpdir

Instead of:
Unable open conf/bitbake.conf

---
 lib/bb/cooker.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
lib/bb/cooker.py +2 -2
index 1f9bb49..3a06d73 100644
@@ -400,8 +400,8 @@ class BBCooker:
 
             bb.event.fire(bb.event.ConfigParsed(self.configuration.data))
 
-        except IOError:
-            bb.msg.fatal(bb.msg.domain.Parsing, "Unable to open %s" % afile )
+        except IOError, e:
+            bb.msg.fatal(bb.msg.domain.Parsing, "Unable to open %s (%s)" % (afile,e) )
         except bb.parse.ParseError, details:
             bb.msg.fatal(bb.msg.domain.Parsing, "Unable to parse %s (%s)" % (afile, details) )
 
Signature · 1 line
1.5.6.3