Browse Source

Fixing shebang character limit issue in RedHat 7 system

Change-Id: I63092da88061948087905788bdcf964d7cc487da
(cherry picked from commit f310983743643ed165d5bfbabed82aa57a2fe940)
(cherry picked from commit 865333a265eb10149e9dd4a10e5389b1518913b7)
(cherry picked from commit a113b230abb07d22d80301b837e91a1510e695bd)
(cherry picked from commit 290de87ab94f76939702a2c5e842f9c7ccc52a41)
Prakash Ranade 3 năm trước cách đây
mục cha
commit
44aa911b03
1 tập tin đã thay đổi với 8 bổ sung4 xóa
  1. 8 4
      tools/app_reg/build.py

+ 8 - 4
tools/app_reg/build.py

@@ -56,8 +56,10 @@ def make_syncdb():
   make_syncdb() -> True/False
   """
   statuses = []
-  hue_exec = os.path.join(common.INSTALL_ROOT, 'build', 'env', 'bin', 'hue')
-  if os.path.exists(hue_exec):
+  python_exec = os.path.join(common.INSTALL_ROOT, 'build', 'env', 'bin', 'python')
+  hue_file = os.path.join(common.INSTALL_ROOT, 'build', 'env', 'bin', 'hue')
+  hue_exec = "%s %s" % (python_exec, hue_file)
+  if os.path.exists(hue_file):
     statuses.append( runcmd([ hue_exec, 'makemigrations', '--noinput' ]) )
     statuses.append( runcmd([ hue_exec, 'migrate', '--fake-initial' ]) )
   return not any(statuses)
@@ -67,7 +69,9 @@ def make_collectstatic():
   make_collectstatic() -> True/False
   """
   statuses = []
-  hue_exec = os.path.join(common.INSTALL_ROOT, 'build', 'env', 'bin', 'hue')
-  if os.path.exists(hue_exec):
+  python_exec = os.path.join(common.INSTALL_ROOT, 'build', 'env', 'bin', 'python')
+  hue_file = os.path.join(common.INSTALL_ROOT, 'build', 'env', 'bin', 'hue')
+  hue_exec = "%s %s" % (python_exec, hue_file)
+  if os.path.exists(hue_file):
     statuses.append( runcmd([ hue_exec, 'collectstatic', '--noinput' ]) )
   return not any(statuses)