diff options
| author | Alex Schultz <aschultz@redhat.com> | 2019-01-15 16:33:24 -0700 |
|---|---|---|
| committer | Alex Schultz <aschultz@redhat.com> | 2019-01-16 08:36:44 -0700 |
| commit | fca732b81e4eb5daa56da16e338bdd305a56d5bd (patch) | |
| tree | 41f9da6416f41184abbc029ed69c2df2a0149afb /kolla/image | |
| parent | 3410a6165af199992c0b06eaf603dd0dde72c4b0 (diff) | |
| download | kolla-fca732b81e4eb5daa56da16e338bdd305a56d5bd.tar.gz kolla-fca732b81e4eb5daa56da16e338bdd305a56d5bd.zip | |
Add base_package_type
Currently in all the Dockerfile.j2 files, we are doing base distro if
conditions for package names when installing via a binary. Rather than
duplicating these base_distro in [<distros>], let's provide a single
value for determining the binary installation method. This change adds a
base_package_type which we can use to lookup if 'rpm' or if 'deb' rather
than relying on specific distro names.
Change-Id: I8a0c6c8fbc32a8cfa6932fddf28a449fceda3d49
Diffstat (limited to 'kolla/image')
| -rwxr-xr-x | kolla/image/build.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/kolla/image/build.py b/kolla/image/build.py index 6cb1cb2da..4dd3daec7 100755 --- a/kolla/image/build.py +++ b/kolla/image/build.py @@ -697,6 +697,14 @@ class KollaWorker(object): else: self.distro_python3 = False + # 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( @@ -886,6 +894,7 @@ class KollaWorker(object): 'base_image': self.conf.base_image, 'base_distro_tag': self.base_tag, 'base_arch': self.base_arch, + 'base_package_type': self.base_package_type, 'supported_distro_release': supported_distro_release, 'install_metatype': self.install_metatype, 'image_prefix': self.image_prefix, |
