浏览代码

do not pre-create the static-build directory in the build script

This causes problems when the first target is for setting up schroot,
which is typically run via sudo and will ensure that the directory
will be created with root as owner -- fixes #1751
Ashish Kulkarni 11 年之前
父节点
当前提交
61cda9368f
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      scripts/build.py

+ 1 - 2
scripts/build.py

@@ -402,6 +402,7 @@ def mkdir_p(path):
         os.makedirs(path)
 
 def get_version(basedir):
+    mkdir_p(basedir)
     text = open(os.path.join(basedir, '..', 'VERSION'), 'r').read()
     if '-' not in text:
         return (text, text)
@@ -947,8 +948,6 @@ def usage(exit_code=2):
 
 def main():
     basedir = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', 'static-build')
-    mkdir_p(basedir)
-
     if len(sys.argv) == 1:
         usage(0)