Skip to content

Commit

Permalink
fix(ublue-builder): dont skip arch when there is no "ExclusiveArch" f…
Browse files Browse the repository at this point in the history
…ield on spec
  • Loading branch information
tulilirockz committed Feb 20, 2025
1 parent 9efb032 commit c9be0bf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ build $spec *MOCK_ARGS:
MOCK_DIR="${MOCK_DIRECTORY:-./mock}"
SOURCES_DIR="${SOURCES_DIR:-.}"
sudo podman run --privileged --rm -it \
--pull "newer" \
-v "$CONTAINERS_DIR:/var/lib/containers:z" \
-v "$MOCK_DIR:/var/lib/mock:Z" \
-v "$SOURCES_DIR:/tmp/sources:Z" \
Expand Down
10 changes: 7 additions & 3 deletions ublue-builder/mock-wrapper
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,13 @@ group_start "Generate spec file with rpkg"
OUTDIR="$(mktemp -d)"
SPEC_PATH="$(realpath "$(dirname "$SPEC_FILE")")"
rpkg --path "${SPEC_PATH}" spec --outdir "$OUTDIR"
if ! rpmspec -P "${OUTDIR}"/*.spec | grep "ExclusiveArch:" | grep "$(arch)" ; then
echo "Arch Skipped" | tee /tmp/sources/arch_skipped
exit 0
RPMSPEC_FOR_CHECK="$(mktemp)"
rpmspec -P "${OUTDIR}"/*.spec | tee "${RPMSPEC_FOR_CHECK}"
if grep "ExclusiveArch:" "${RPMSPEC_FOR_CHECK}" ; then
if ! grep "$(arch)" "${RPMSPEC_FOR_CHECK}" ; then
echo "Arch Skipped" | tee /tmp/sources/arch_skipped
exit 0
fi
fi
group_end

Expand Down

0 comments on commit c9be0bf

Please sign in to comment.