diff options
| author | Zuul <zuul@review.opendev.org> | 2021-08-04 13:53:41 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2021-08-04 13:53:41 +0000 |
| commit | ea6ceef686c018d810a2ff20ca4ba81aa77164e5 (patch) | |
| tree | defd00df6e8a409b28e77249e345d3056cd9d043 /kolla/image | |
| parent | c1e7df7c89af3b5066279deafba212a001f1df84 (diff) | |
| parent | bd90b02708d8c6b88692ec7308a41229fdcdaf22 (diff) | |
| download | kolla-ea6ceef686c018d810a2ff20ca4ba81aa77164e5.tar.gz kolla-ea6ceef686c018d810a2ff20ca4ba81aa77164e5.zip | |
Merge "drop leftovers of RHEL support"
Diffstat (limited to 'kolla/image')
| -rwxr-xr-x | kolla/image/build.py | 49 |
1 files changed, 9 insertions, 40 deletions
diff --git a/kolla/image/build.py b/kolla/image/build.py index c017d1143..fc897bdd2 100755 --- a/kolla/image/build.py +++ b/kolla/image/build.py @@ -657,59 +657,29 @@ class KollaWorker(object): conf.rpm_setup_config if repo_file is not None]) self.rpm_setup = self.build_rpm_setup(rpm_setup_config) - rh_base = ['centos', 'rhel'] - rh_type = ['source', 'binary', 'rdo', 'rhos'] - deb_base = ['ubuntu', 'debian'] - deb_type = ['source', 'binary'] - - if self.base in rh_base: + if self.base in ['centos']: self.conf.distro_python_version = "3.6" + self.distro_package_manager = 'dnf' + self.base_package_type = 'rpm' elif self.base in ['debian']: self.conf.distro_python_version = "3.9" + self.distro_package_manager = 'apt' + self.base_package_type = 'deb' elif self.base in ['ubuntu']: self.conf.distro_python_version = "3.8" + self.distro_package_manager = 'apt' + self.base_package_type = 'deb' else: # Assume worst self.conf.distro_python_version = "3.6" if self.conf.distro_package_manager is not None: - package_manager = self.conf.distro_package_manager - elif self.base in rh_base: - package_manager = 'dnf' - elif self.base in deb_base: - package_manager = 'apt' - self.distro_package_manager = package_manager + self.distro_package_manager = self.conf.distro_package_manager - self.clean_package_cache = self.conf.clean_package_cache - - # Determine base packaging type for use in Dockerfiles. if self.conf.base_package_type: self.base_package_type = self.conf.base_package_type - elif self.base in rh_base: - self.base_package_type = 'rpm' - elif self.base in deb_base: - self.base_package_type = 'deb' - - if not ((self.base in rh_base and self.install_type in rh_type) or - (self.base in deb_base and self.install_type in deb_type)): - raise exception.KollaMismatchBaseTypeException( - '{} is unavailable for {}'.format(self.install_type, self.base) - ) - if self.install_type == 'binary': - self.install_metatype = 'rdo' - elif self.install_type == 'source': - self.install_metatype = 'mixed' - elif self.install_type == 'rdo': - self.install_type = 'binary' - self.install_metatype = 'rdo' - elif self.install_type == 'rhos': - self.install_type = 'binary' - self.install_metatype = 'rhos' - else: - raise exception.KollaUnknownBuildTypeException( - 'Unknown install type' - ) + self.clean_package_cache = self.conf.clean_package_cache if (self.install_type == 'binary' and self.base == 'debian' and self.base_arch != 'x86_64'): @@ -904,7 +874,6 @@ class KollaWorker(object): 'debian_arch': self.debian_arch, 'docker_healthchecks': self.docker_healthchecks, 'supported_distro_name': supported_distro_name, - 'install_metatype': self.install_metatype, 'image_prefix': self.image_prefix, 'infra_image_prefix': self.infra_image_prefix, 'install_type': self.install_type, |
