From 76f1df76d37300d412d520e25149bc37f2fef0b3 Mon Sep 17 00:00:00 2001 From: Bruno Goncalves Date: Apr 27 2020 12:45:07 +0000 Subject: [PATCH 1/2] allow dnf to install packages with allowerasing fix https://pagure.io/standard-test-roles/issue/380 --- diff --git a/roles/str-common-pkgs/tasks/pkgs-dnf.yml b/roles/str-common-pkgs/tasks/pkgs-dnf.yml index 1d20621..026d6be 100644 --- a/roles/str-common-pkgs/tasks/pkgs-dnf.yml +++ b/roles/str-common-pkgs/tasks/pkgs-dnf.yml @@ -27,7 +27,11 @@ - name: Install test-specific package requirements # Note, this method cannot install -debuginfo packages. - package: name={{ item }} state=present + # Note, package module doesn't support allowerasing + shell: | + dnf install --assumeyes --allowerasing {{item}} + args: + warn: false register: result with_flattened: - "{{ pkgs_ordinary_req|d|list }}" From 7cfe476baa3b731d9c6d7bc8ca5275636d2d3d49 Mon Sep 17 00:00:00 2001 From: Bruno Goncalves Date: Apr 28 2020 14:47:17 +0000 Subject: [PATCH 2/2] don't remove yum-utils to install dnf-utils removal of yum-utils and than installing dnf-utils can cause remove of dependencies. --- diff --git a/roles/str-common-pkgs/tasks/pkgs-dnf.yml b/roles/str-common-pkgs/tasks/pkgs-dnf.yml index 026d6be..75c5ebe 100644 --- a/roles/str-common-pkgs/tasks/pkgs-dnf.yml +++ b/roles/str-common-pkgs/tasks/pkgs-dnf.yml @@ -1,12 +1,10 @@ -- name: Remove yum-utils for dnf system - package: name=yum-utils state=absent - register: result - retries: 5 - delay: 10 - until: result is succeeded - - name: Install additional dnf packages - package: name={{ item }} state=present + # Note, use allowerasing in case yum-utils and dnf-utils conflict with each other + # usually there should be no conflict, but sometimes installing dnf-utils will actually install yum-utils + shell: | + dnf install --assumeyes --allowerasing {{item}} + args: + warn: false register: result with_items: - dnf-plugins-core