dnf_package("java-11-openjdk, java-11-openjdk-devel") do
package_name ["java-11-openjdk", "java-11-openjdk-devel"]
action [:install]
default_guard_interpreter :default
declared_type :package
cookbook_name "vinted-java"
version "11.0.20.0.8"
end
Install failure:
Begin output of ["dnf", "-y", "install", "java-11-openjdk-1:11.0.20.0.8-3.el8_8.x86_64", "java-11-openjdk-devel-1:11.0.21.0.9-2.el8_8.x86_64"]
STDERR: Error:
Problem: package java-11-openjdk-devel-1:11.0.21.0.9-2.el8_8.x86_64 requires java-11-openjdk(x86-64) = 1:11.0.21.0.9-2.el8_8, but none of the providers can be installed
cannot install both java-11-openjdk-1:11.0.21.0.9-2.el8_8.x86_64 and java-11-openjdk-1:11.0.20.0.8-3.el8_8.x86_64
:police_car: Expected behavior
OpenJDK 11 install should succeed.
:heavy_plus_sign: Additional context
pkg_versiononly accepts string. Making changes locally and passing array makes it work as expected.
Actually, same issue as on old cookbook version, but you could pass array via attributes.
What would be accepted solution:
a) allow to pass Array
b) duplicate String pkg_version to array number of time there are packages
:speaking_head: Foreword
:ghost: Brief Description
openjdk_pkg_install
passes single version string topackage
resource. Propertypkg_names
is Array by defaultdefault_openjdk_pkg_names(version)
.First package from
pkg_names
array obeyspkg_version
property, next one is set to "newest available" (nil?) and openjdk install fails.:pancakes: Cookbook version
11.2.2
:woman_cook: Chef-Infra Version
16.18.0
:tophat: Platform details
Rocky Linux 8, RHEL platform.
As a point, let's use previous Rocky Linux 8.8 release with multiple java-11-openjdk packages.
Steps To Reproduce
Steps to reproduce the behavior:
:police_car: Expected behavior
OpenJDK 11 install should succeed.
:heavy_plus_sign: Additional context
pkg_version
only accepts string. Making changes locally and passing array makes it work as expected.Actually, same issue as on old cookbook version, but you could pass array via attributes.
What would be accepted solution:
a) allow to pass Array b) duplicate String
pkg_version
to array number of time there are packages