Skip to content

Commit

Permalink
Force pyc files renewal during postinstall
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaudveron committed Jan 29, 2018
1 parent 4f8f2a3 commit dea84b4
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions bin/postinstall
Expand Up @@ -1116,6 +1116,16 @@ def log_file_info(path):
string = "uid[%d] gid[%d] perms[%s] file[%s]" % (info.st_uid, info.st_gid, oct(info.st_mode & 777), path)
logit(string)

def clean_pyc():
logit("begin")
for fpath in glob.glob(os.path.join(pathlib, "*.pyc")):
try:
os.remove(fpath)
except:
msg = "issue met while trying to remove pyc file [%s]" % fpath
logit(msg)
pass

def dump_install_content():
logit("begin")
if sysname == 'Windows':
Expand Down Expand Up @@ -1215,6 +1225,7 @@ try:
convert_to_lsb()
move_env_to_conf()
move_var_files_19()
clean_pyc()
dump_install_content()
restart_daemon()
logit("\nOpenSVC postinstall terminated\n",stdout=True)
Expand Down

0 comments on commit dea84b4

Please sign in to comment.