diff --git a/nodepool/scripts/cache_devstack.py b/nodepool/scripts/cache_devstack.py index 88e0abe8bc..379d13aa06 100755 --- a/nodepool/scripts/cache_devstack.py +++ b/nodepool/scripts/cache_devstack.py @@ -160,14 +160,6 @@ def cache_debs(debs, uca_pocket=None): def main(): distribution = sys.argv[1] - if (os.path.exists('/etc/redhat-release') and - open('/etc/redhat-release').read().startswith("CentOS release 6")): - # --downloadonly is provided by the yum-plugin-downloadonly package - # on CentOS 6.x - centos6 = True - run_local(['sudo', 'yum', 'install', '-y', 'yum-plugin-downloadonly']) - else: - centos6 = False branches = local_prep(distribution) image_filenames = [] for branch_data in branches: @@ -176,17 +168,8 @@ def main(): for uca in sorted(UCA_POCKETS): cache_debs(branch_data['debs'], uca) elif branch_data.get('rpms'): - if centos6: - # some packages may depend on python-setuptools, which is not - # installed and cannot be reinstalled on CentOS 6.x once yum - # has erased them, so use --skip-broken to avoid aborting; also - # on this platform --downloadonly causes yum to return nonzero - # even when it succeeds, so ignore its exit code - run_local(['sudo', 'yum', 'install', '-y', '--downloadonly', - '--skip-broken'] + branch_data['rpms']) - else: - run_local(['sudo', 'yum', 'install', '-y', '--downloadonly'] + - branch_data['rpms']) + run_local(['sudo', 'yum', 'install', '-y', '--downloadonly'] + + branch_data['rpms']) else: sys.exit('No supported package data found.')