summaryrefslogtreecommitdiffstats
path: root/source-builder/sb/path.py
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2013-04-15 10:05:23 +1000
committerChris Johns <chrisj@rtems.org>2013-04-15 10:05:23 +1000
commit9994530920e2ea9d80c81d9414e5cd575b9bb116 (patch)
tree73d5c28a0e900a16187ec37290dcf4f9dbedd19a /source-builder/sb/path.py
parentPR 2115 - Fixed the exception on no 'what'. (diff)
downloadrtems-source-builder-9994530920e2ea9d80c81d9414e5cd575b9bb116.tar.bz2
PR 2115 - Check prefix path write access before starting to build.
Added a check in the options post processing to check is the prefix path allows writes. No actual write check is made. just the permissions are checked. If the --no-install options is used the check is not made. Moved the --no-install option from the set builder to the options module.
Diffstat (limited to 'source-builder/sb/path.py')
-rw-r--r--source-builder/sb/path.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/source-builder/sb/path.py b/source-builder/sb/path.py
index aa48578..35907e4 100644
--- a/source-builder/sb/path.py
+++ b/source-builder/sb/path.py
@@ -89,6 +89,9 @@ def isfile(path):
def isabspath(path):
return path[0] == '/'
+def iswritable(path):
+ return os.access(host(path), os.W_OK)
+
def mkdir(path):
path = host(path)
if exists(path):