Do not attempt to create 64bit rootstrap if set False 58/177558/2
authorhyokeun <hyokeun.jeon@samsung.com>
Wed, 2 May 2018 02:34:33 +0000 (11:34 +0900)
committerhyokeun <hyokeun.jeon@samsung.com>
Wed, 2 May 2018 02:34:48 +0000 (11:34 +0900)
Default is True.

Change-Id: I50d6a7efc9a9e77ea13b7bb5ab52be83203dab3e

job_create_sdkrootstrap.py

index 74456e3..7b0ef9f 100755 (executable)
@@ -210,21 +210,27 @@ def make_rs_snapshot_private(git_prj, git_cache, mygit, fields, profile, vm_imag
     git_cmd = 'git clone ssh://%s:%s/%s -b %s' % ( git_host, git_port, git_prj, git_branch)
     print 'git_cmd %s' %(git_cmd)
 
+    # 64 bit support
+    str_64_cmd = ''
+    if profile.get('support_64') != 'False':
+        str_64_cmd = '$WORKDIR/$SDKIMAGE/make_%s_64.sh -u %s -b %s\n' % \
+            (profile["private_cmd"],
+             os.path.join(profile["base_url"],profile["repo_path"],build_id),
+             os.path.join(profile["base_url"],profile["base_repo_path"],'latest'))
+
     buildcmd = '#!/bin/bash \nset -x\n' \
                'BUILDDIR="/share/build"\nWORKDIR="/srv/work"\nRS="rbs_out"\nSDKIMAGE="sdk-image"\n' \
                'chown -R build:build $BUILDDIR\nchmod 600 $BUILDDIR/.ssh/id_rsa \n' \
                'cp -r "$BUILDDIR/.ssh/" /root/\nchmod 600 /root/.ssh/id_rsa\n' \
                'mkdir -p "$WORKDIR"\ncd "$WORKDIR"\n%s\n' \
                '$WORKDIR/$SDKIMAGE/make_%s.sh -u %s -b %s\n' \
-               '$WORKDIR/$SDKIMAGE/make_%s_64.sh -u %s -b %s\n' \
+               '%s\n' \
                'cp -r $WORKDIR/$RS/ $BUILDDIR\n' % \
                (git_cmd,
                 profile["private_cmd"],
                 os.path.join(profile["base_url"],profile["repo_path"],build_id),
                 os.path.join(profile["base_url"],profile["base_repo_path"],'latest'),
-                profile["private_cmd"],
-                os.path.join(profile["base_url"],profile["repo_path"],build_id),
-                os.path.join(profile["base_url"],profile["base_repo_path"],'latest'))
+                str_64_cmd)
 
     print buildcmd
     with open(os.path.join(builddir, 'run'), 'w') as fcmdl:
@@ -344,21 +350,27 @@ def make_rs_snapshot_public(git_prj, git_cache, mygit, fields, profile, vm_image
     git_cmd = 'git clone ssh://%s:%s/%s -b %s' % ( git_host, git_port, git_prj, git_branch)
     print 'git_cmd %s' %(git_cmd)
 
+    # 64 bit support
+    str_64_cmd = ''
+    if profile.get('support_64') != 'False':
+        str_64_cmd = '$WORKDIR/$SDKIMAGE/make_%s_64.sh -u %s -b %s\n' % \
+            (profile["public_cmd"],
+             os.path.join(profile["base_url"],profile["repo_path"],build_id),
+             os.path.join(profile["base_url"],profile["base_repo_path"],'latest'))
+
     buildcmd = '#!/bin/bash \n' \
                'BUILDDIR="/share/build"\nWORKDIR="/srv/work"\nRS="rbs_out"\nSDKIMAGE="sdk-image"\n' \
                'chown -R build:build $BUILDDIR\nchmod 600 $BUILDDIR/.ssh/id_rsa \n' \
                'cp -r "$BUILDDIR/.ssh/" /root/\nchmod 600 /root/.ssh/id_rsa\n' \
                'mkdir -p "$WORKDIR"\ncd "$WORKDIR"\n%s\n' \
                '$WORKDIR/$SDKIMAGE/make_%s.sh -u %s -b %s\n' \
-               '$WORKDIR/$SDKIMAGE/make_%s_64.sh -u %s -b %s\n' \
+               '%s\n' \
                'cp -r $WORKDIR/$RS/ $BUILDDIR\n' % \
                (git_cmd,
                 profile["public_cmd"],
                 os.path.join(profile["base_url"],profile["repo_path"],build_id),
                 os.path.join(profile["base_url"],profile["base_repo_path"],'latest'),
-                profile["public_cmd"],
-                os.path.join(profile["base_url"],profile["repo_path"],build_id),
-                os.path.join(profile["base_url"],profile["base_repo_path"],'latest'))
+                str_64_cmd)
 
     print buildcmd
     with open(os.path.join(builddir, 'run'), 'w') as fcmdl:
@@ -536,3 +548,4 @@ def main():
 if __name__ == "__main__":
     sys.exit(main())
 
+