From 81fda3225d4c5fce3cd776e5193b5a3b252210f2 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Jun 30 2021 16:40:34 +0000 Subject: Don't require srpm name to match spec name Some packages that share a specfile between Fedora and CentOS/RHEL have different source package names on those distributions. Instead of enforcing that they be the same, just ensure that exactly one source RPM was produced by the mock-build. Signed-off-by: Stephen Gallagher --- diff --git a/roles/mock-srpm-build/tasks/main.yaml b/roles/mock-srpm-build/tasks/main.yaml index fb7c020..5e2ad65 100644 --- a/roles/mock-srpm-build/tasks/main.yaml +++ b/roles/mock-srpm-build/tasks/main.yaml @@ -43,7 +43,7 @@ - state.log - name: Get SRPM path - shell: ls {{ output_repo_dir }}/{{ package_name }}-*.src.rpm + shell: globexpand=({{ output_repo_dir }}/*.src.rpm) && [[ -e "${globexpand[@]}" ]] && ls {{ output_repo_dir }}/*.src.rpm register: result - name: Set SRPM path fact