While patch Ibace4cdf89d0615a2e5117f9ea3ca50730d5c93d fixed the setup
for the IUS repo. It failed to ensure that Git 2 is installed from the
IUS repo.
In the refactored IUS repo git2u no longer exists and instead the
latest Git package appears to be git224 so let's update to that
version.
Also class cast ansible_distribution_major_version|int as this variable
normally returns a type AnsibleUnsafeText which cannot be compared to
an int type.
Change-Id: I1cd815fb0440be996ba66c3a48eab9d6da02f4bb
Signed-off-by: Thanh Ha <zxiiro@gmail.com>
gpgcheck: "yes"
state: present
includepkgs:
- - git2u*
+ - git2*
- yum-plugin-replace
become: true
when:
state: latest
become: true
-- name: Swap to git2u
+- name: Swap to git224
block:
- name: Install yum-plugin-replace
yum:
- name: Gather rpm package facts
package_facts:
manager: auto
- - name: Replace git with git2u
- command: yum replace -y git --replace-with git2u
+ - name: Replace git with git224
+ command: yum replace -y git --replace-with git224
when: ansible_facts.packages['git'] is defined
become: true
when:
- - ansible_distribution_major_version < 8
+ - ansible_distribution_major_version|int < 8
--- /dev/null
+---
+fixes:
+ - |
+ Fix failure to install Git 2 from the IUS repo. While the patch
+ https://gerrit.linuxfoundation.org/infra/c/releng/common-packer/+/62244
+ sets up the IUS repo, it fails to replace git with git from the IUS repo
+ due to the selected package git2u being non-existant in the repo.
+ This update instead installs git224 from the IUS repo.