Merge "Allow package-installs to parse DIB_PYTHON_VERSION"
This commit is contained in:
commit
8565867734
@ -26,6 +26,10 @@ example ``package-installs.yaml``
|
|||||||
not-arch: ppc64, ppc64le
|
not-arch: ppc64, ppc64le
|
||||||
lshw:
|
lshw:
|
||||||
arch: ppc64, ppc64le
|
arch: ppc64, ppc64le
|
||||||
|
python-dev:
|
||||||
|
dib_python_version: 2
|
||||||
|
python3-dev:
|
||||||
|
dib_python_version: 3
|
||||||
|
|
||||||
example package-installs.json
|
example package-installs.json
|
||||||
|
|
||||||
@ -46,6 +50,7 @@ the following default values::
|
|||||||
uninstall: False
|
uninstall: False
|
||||||
installtype: * (Install package for all installtypes)
|
installtype: * (Install package for all installtypes)
|
||||||
arch: * (Install package for all architectures)
|
arch: * (Install package for all architectures)
|
||||||
|
dib_python_version: (2 or 3 depending on DIB_PYTHON_VERSION, see dib-python)
|
||||||
|
|
||||||
Setting the installtype property causes the package only to be installed if
|
Setting the installtype property causes the package only to be installed if
|
||||||
the specified installtype would be used for the element. See the
|
the specified installtype would be used for the element. See the
|
||||||
|
@ -75,8 +75,12 @@ def collect_data(data, filename, element_name):
|
|||||||
installtype == elem_installtype)
|
installtype == elem_installtype)
|
||||||
valid_arch = _valid_for_arch(pkg_name, params.get('arch', None),
|
valid_arch = _valid_for_arch(pkg_name, params.get('arch', None),
|
||||||
params.get('not-arch', None))
|
params.get('not-arch', None))
|
||||||
|
dib_py_version = str(params.get('dib_python_version', ''))
|
||||||
|
dib_py_version_env = os.environ.get('DIB_PYTHON_VERSION', '')
|
||||||
|
valid_dib_python_version = (dib_py_version == '' or
|
||||||
|
dib_py_version == dib_py_version_env)
|
||||||
|
|
||||||
if valid_installtype and valid_arch:
|
if valid_installtype and valid_arch and valid_dib_python_version:
|
||||||
data[phase][install].append((pkg_name, element_name))
|
data[phase][install].append((pkg_name, element_name))
|
||||||
|
|
||||||
return data
|
return data
|
||||||
|
Loading…
Reference in New Issue
Block a user