Remove unnecessary distribution determination

The need for the distribution was removed in I249f21a98fea3b963b7ffb8e3d0fce02cc540d46
so we can remove the code around that was determining it but not
actually making use of it anywhere anymore.

Change-Id: I572943bbc0c2665a885b7a80cdb2d1817c61bc3c
This commit is contained in:
Dirk Mueller 2018-03-02 01:54:11 +01:00
parent 7dcd96cd84
commit 6864367ad8
1 changed files with 2 additions and 27 deletions

View File

@ -21,35 +21,10 @@ from __future__ import unicode_literals
import os
import subprocess
import sys
TMP_MOUNT_PATH = os.environ['TMP_MOUNT_PATH']
TMP_HOOKS_PATH = os.environ['TMP_HOOKS_PATH']
# this is a bit weird; we want to get the filter to use on the
# devstack lib/[apt|rpm] files to pre-install them. So we have to
# swizzle things around
RELEASE = None
if 'DIB_RELEASE' in os.environ:
RELEASE = os.environ['DIB_RELEASE']
try:
if open(os.path.join(
TMP_MOUNT_PATH,
'etc/redhat-release')).read().startswith('CentOS release 6'):
# not actually used in devstack, but for consistency and because this
# script will error if run on a platform where RELEASE isn't detected
# as something
RELEASE = 'rhel6'
except IOError:
pass
if 'DISTRO_NAME' in os.environ:
if os.environ['DISTRO_NAME'] == 'centos7':
# centos7 matches as rhel7 in devstack
RELEASE = 'rhel7'
if not RELEASE:
print("Can not determine RELEASE")
sys.exit(1)
DEVSTACK = os.path.join(TMP_MOUNT_PATH, 'opt/git/openstack-dev/devstack')
CACHEDIR = os.path.join(TMP_MOUNT_PATH, 'tmp')
IMAGES = os.path.join(TMP_HOOKS_PATH, 'source-repository-images')
@ -119,7 +94,7 @@ def _find_images(basedir):
return images
def local_prep(distribution):
def local_prep():
branches = []
for branch in git_branches():
# Ignore branches of the form 'somestring -> someotherstring'
@ -145,7 +120,7 @@ def local_prep(distribution):
def main():
branches = local_prep(RELEASE)
branches = local_prep()
image_filenames = []
line_template = "%(name)s file %(location)s %(url)s\n"