Skip to content

Commit

Permalink
Closes-Bug: #1594994 Set the storage repo properly when adding a stor…
Browse files Browse the repository at this point in the history
…age tgz package

Change-Id: I00b16947044042dc4bc1324ed6cb25a083c2650c
  • Loading branch information
sgurumurthy committed Aug 2, 2016
1 parent 8fa8f60 commit 592b165
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/server_mgr_main.py
Expand Up @@ -2328,9 +2328,9 @@ def _create_storage_deb_repo(
if 'Debian binary package' in output:
cmd = ("mv ./opt/contrail/contrail_packages/contrail_storage_debs.tgz .")
subprocess.check_call(cmd, shell=True)

#Since CentOS is new but default repopinning will be enabled for it
# check if its a new version where repo pinning changes are brought in
if os.path.isfile('./opt/contrail/contrail_packages/.repo_pinning'):
if os.path.isfile('./opt/contrail/contrail_packages/.repo_pinning') or (output and 'gzip compressed data' in output):
repo_pinning = True
else:
repo_pinning = False
Expand All @@ -2340,9 +2340,9 @@ def _create_storage_deb_repo(
# untar tgz to get all packages
cmd = ("tar xvzf contrail_storage_debs.tgz > /dev/null")
subprocess.check_call(cmd, shell=True)
# remove the tgz file itself, not needed any more
cmd = ("rm -f contrail_storage_debs.tgz")
subprocess.check_call(cmd, shell=True)
# remove the tgz file itself, not needed any more
cmd = ("rm -f contrail_storage_debs.tgz")
subprocess.check_call(cmd, shell=True)

# if repo pinning is enabled use reprepo to create the repo
if repo_pinning:
Expand Down

0 comments on commit 592b165

Please sign in to comment.