Skip to contentSkip to conversation

sanity check for writable DL_DIR, to fix bug 606

PATCH New Yu Ke 1 participant 2 messages Dec 22, 2010

lore
Share & tools
lore
author
#1 lore raw

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

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]

---
 meta/classes/sanity.bbclass |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
meta/classes/sanity.bbclass +6 -0
index e9217f9..696629e 100644
@@ -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)
Signature · 1 line
1.7.0.4