[poky] [PATCH 1/1] sanity.bbclass: check if DL_DIR is writeable

Yu Ke ke.yu at intel.com
Wed Dec 22 00:23:55 PST 2010


bug 606 report that when DL_DIR is read-only, bitbake
will silently hang, which is not informative

This patch add sanity check to make sure DL_DIR is
writeable, and report error message if not

Fix [BUGID #606]

Signed-off-by: Yu Ke <ke.yu at intel.com>
---
 meta/classes/sanity.bbclass |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index e9217f9..696629e 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -261,6 +261,12 @@ def check_sanity(e):
     f.close()
 
     #
+    # DL_DIR should be writable for fetcher to be functional
+    #
+    if not os.access(bb.data.getVar("DL_DIR", e.data, True), os.W_OK):
+        messages = messages + "Error: DL_DIR is not writeable"
+
+    #
     # Check the 'ABI' of TMPDIR
     #
     current_abi = data.getVar('OELAYOUT_ABI', e.data, True)
-- 
1.7.0.4




More information about the poky mailing list