소스 검색

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)