Accepting request 819504 from home:favogt:chrootservices
OBS-URL: https://build.opensuse.org/request/show/819504 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/obs-service-kiwi_label_helper?expand=0&rev=6
This commit is contained in:
parent
c786194b94
commit
94d90edf12
@ -1,5 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -eu
|
set -eu
|
||||||
|
shopt -s nullglob
|
||||||
|
|
||||||
if [ "${BUILD_DIST+x}" != "x" ]; then
|
if [ "${BUILD_DIST+x}" != "x" ]; then
|
||||||
echo "Not running in an OBS build container"
|
echo "Not running in an OBS build container"
|
||||||
@ -7,21 +8,38 @@ if [ "${BUILD_DIST+x}" != "x" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
BUILD_DATA="${BUILD_DIST/.dist/.data}"
|
BUILD_DATA="${BUILD_DIST/.dist/.data}"
|
||||||
. "${BUILD_DATA}"
|
if [ -e "${BUILD_DATA}" ]; then
|
||||||
|
. "${BUILD_DATA}"
|
||||||
|
|
||||||
# The build script renames the recipe (to strip _service:foo:), but doesn't update .data
|
# The build script renames the recipe (to strip _service:foo:), but doesn't update .data
|
||||||
RECIPEFILE="${RECIPEFILE##*:}"
|
RECIPEFILE="${RECIPEFILE##*:}"
|
||||||
|
|
||||||
if [ "${RECIPEFILE##*.}" != "kiwi" ]; then
|
if [ "${RECIPEFILE##*.}" != "kiwi" ]; then
|
||||||
echo "Recipe is not a kiwi file - exiting"
|
echo "Recipe is not a kiwi file - exiting"
|
||||||
exit 0
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
files=("${RECIPEFILE}")
|
||||||
|
else
|
||||||
|
echo "Warning: No build data found - chroot build?"
|
||||||
|
DISTURL="local"
|
||||||
|
RELEASE=0
|
||||||
|
|
||||||
|
# Guess the build recipe
|
||||||
|
files=(*.kiwi)
|
||||||
|
if [ "${#files}" -eq 0 ]; then
|
||||||
|
echo "No kiwi recipe - exiting"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
tmp=$(mktemp)
|
for file in "${files[@]}"; do
|
||||||
if ! xsltproc /usr/lib/kiwi_label_helper/label_helper.xsl "${RECIPEFILE}" >> "${tmp}"; then
|
tmp="$(mktemp)"
|
||||||
|
if ! xsltproc /usr/lib/kiwi_label_helper/label_helper.xsl "${file}" >> "${tmp}"; then
|
||||||
rm "${tmp}"
|
rm "${tmp}"
|
||||||
echo "xsltproc failed"
|
echo "xsltproc failed"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mv -f "${tmp}" "${RECIPEFILE}"
|
mv -f "${tmp}" "${file}"
|
||||||
|
done
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jul 7 14:42:29 UTC 2020 - Fabian Vogt <fvogt@suse.com>
|
||||||
|
|
||||||
|
- Add explicit fallback for chroot builds
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon May 4 13:42:18 UTC 2020 - Fabian Vogt <fvogt@suse.com>
|
Mon May 4 13:42:18 UTC 2020 - Fabian Vogt <fvogt@suse.com>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user