summaryrefslogtreecommitdiffstats
path: root/meta/classes/sanity.bbclass
diff options
context:
space:
mode:
authorBeth Flanagan <elizabeth.flanagan@intel.com>2011-01-04 17:22:45 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-01-12 12:09:33 +0000
commitd4731a3f7dbd6aac8ae8dbf5187a72654c3b5733 (patch)
treeb408c3041c8f7e2b970ad7a321acb03d944571f2 /meta/classes/sanity.bbclass
parentac5c28a462de47ac2415edd931ad3ba6e36cfa3f (diff)
downloadpoky-d4731a3f7dbd6aac8ae8dbf5187a72654c3b5733.tar.gz
Adding check for DL_DIR permissions: sanity.bbclass
Check to ensure that DL_DIR is set and that if it exists that it is user writeable. Signed-off-by: Beth Flanagan <elizabeth.flanagan@intel.com>
Diffstat (limited to 'meta/classes/sanity.bbclass')
-rw-r--r--meta/classes/sanity.bbclass10
1 files changed, 9 insertions, 1 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index 46c6ec26e3..315fc34728 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -124,6 +124,14 @@ def check_sanity(e):
124 if data.getVar('MACHINE', e.data, True): 124 if data.getVar('MACHINE', e.data, True):
125 if not check_conf_exists("conf/machine/${MACHINE}.conf", e.data): 125 if not check_conf_exists("conf/machine/${MACHINE}.conf", e.data):
126 messages = messages + 'Please set a valid MACHINE in your local.conf\n' 126 messages = messages + 'Please set a valid MACHINE in your local.conf\n'
127
128 # Check that DL_DIR is set, exists and is writable. In theory, we should never even hit the check if DL_DIR isn't
129 # set, since so much relies on it being set.
130 dldir = data.getVar('DL_DIR', e.data, True)
131 if not dldir:
132 messages = messages + "DL_DIR is not set. Your environment is misconfigured, check that DL_DIR is set, and if the directory exists, that it is writable. \n"
133 if os.path.exists(dldir) and not os.access(dldir, os.W_OK):
134 messages = messages + "DL_DIR: %s exists but you do not appear to have write access to it. \n" % dldir
127 135
128 # Check that the DISTRO is valid 136 # Check that the DISTRO is valid
129 # need to take into account DISTRO renaming DISTRO 137 # need to take into account DISTRO renaming DISTRO
@@ -303,7 +311,7 @@ def check_sanity(e):
303 311
304 oeroot = data.getVar('POKYBASE', e.data) 312 oeroot = data.getVar('POKYBASE', e.data)
305 if oeroot.find ('+') != -1: 313 if oeroot.find ('+') != -1:
306 messages = messages + "Error, you have an invalid character (+) in your POKYBASE directory path. Please more Poky to a directory which doesn't include a +." 314 messages = messages + "Error, you have an invalid character (+) in your POKYBASE directory path. Please move Poky to a directory which doesn't include a +."
307 elif oeroot.find (' ') != -1: 315 elif oeroot.find (' ') != -1:
308 messages = messages + "Error, you have a space in your POKYBASE directory path. Please move Poky to a directory which doesn't include a space." 316 messages = messages + "Error, you have a space in your POKYBASE directory path. Please move Poky to a directory which doesn't include a space."
309 317