Accepting request 868341 from openSUSE:Tools

- Don't enable pipefail: rpm got SIGPIPE because grep -q exits early
  and closes the other end, which made the whole expression fail

OBS-URL: https://build.opensuse.org/request/show/868341
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/obs-service-kiwi_metainfo_helper?expand=0&rev=8
This commit is contained in:
Dominique Leuenberger 2021-02-02 15:54:34 +00:00 committed by Git OBS Bridge
commit 7e399ff3c4
2 changed files with 9 additions and 2 deletions

View File

@ -1,5 +1,6 @@
#!/bin/bash
set -euo pipefail
# Not using -o pipefail, as SIGPIPE is annoying to deal with
set -eu
shopt -s nullglob
if [ "${BUILD_DIST+x}" != "x" ]; then
@ -36,7 +37,7 @@ fi
# Print all rpm files which contain os-release
find_release_rpms() {
find ./repos -name \*-release\*.rpm | while read rpm; do
if rpm -qlp "${rpm}" | grep -qE "^(/etc/os-release|/usr/lib/os-release)$"; then
if rpm -qlp "${rpm}" | grep -qE '^(/etc/os-release|/usr/lib/os-release)$'; then
echo "${rpm}"
fi
done

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Feb 1 10:29:08 UTC 2021 - Fabian Vogt <fvogt@suse.com>
- Don't enable pipefail: rpm got SIGPIPE because grep -q exits early
and closes the other end, which made the whole expression fail
-------------------------------------------------------------------
Wed Jan 27 11:25:26 UTC 2021 - Fabian Vogt <fvogt@suse.com>