Fixing shebang character limit issue in RedHat 7 system
@@ -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)
