From 2e7669c3f5c4c93e9100a6b1a86865e7f6b48f41 Mon Sep 17 00:00:00 2001 From: CBL-Mariner-Bot <75509084+CBL-Mariner-Bot@users.noreply.github.com> Date: Tue, 7 Jan 2025 15:06:53 -0800 Subject: [PATCH] [AUTO-CHERRYPICK] Fixing RPM macros check. - branch 3.0-dev (#11797) Co-authored-by: Pawel Winogrodzki --- .github/workflows/check-manifests.yml | 4 +++- .github/workflows/check-package-cgmanifest.yml | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-manifests.yml b/.github/workflows/check-manifests.yml index a18ed1824bd..e2d4aafa507 100644 --- a/.github/workflows/check-manifests.yml +++ b/.github/workflows/check-manifests.yml @@ -21,7 +21,9 @@ jobs: # This PR runner uses an older Ubuntu with rpm version 4.17, which doesn't understand some newer macros like %bcond - name: Define missing rpm macros run: | - [[ -n $(rpm --eval '%bcond test 1') ]] && echo '%bcond() %[ (%{2}) ? "%{expand:%%bcond_without %{1}}" : "%{expand:%%bcond_with %{1}}" ]' > ~/.rpmmacros + if [[ -n $(rpm --eval '%bcond test 1') ]]; then + echo '%bcond() %[ (%{2}) ? "%{expand:%%bcond_without %{1}}" : "%{expand:%%bcond_with %{1}}" ]' > ~/.rpmmacros + fi - name: Check x86_64 manifests run: | diff --git a/.github/workflows/check-package-cgmanifest.yml b/.github/workflows/check-package-cgmanifest.yml index 59b72371c38..98e7cf1fdf5 100644 --- a/.github/workflows/check-package-cgmanifest.yml +++ b/.github/workflows/check-package-cgmanifest.yml @@ -22,7 +22,9 @@ jobs: # This PR runner uses an older Ubuntu with rpm version 4.17, which doesn't understand some newer macros like %bcond - name: Define missing rpm macros run: | - [[ -n $(rpm --eval '%bcond test 1') ]] && echo '%bcond() %[ (%{2}) ? "%{expand:%%bcond_without %{1}}" : "%{expand:%%bcond_with %{1}}" ]' > ~/.rpmmacros + if [[ -n $(rpm --eval '%bcond test 1') ]]; then + echo '%bcond() %[ (%{2}) ? "%{expand:%%bcond_without %{1}}" : "%{expand:%%bcond_with %{1}}" ]' > ~/.rpmmacros + fi - name: Get base commit for PRs if: ${{ github.event_name == 'pull_request' }}