Hello community,

here is the log from the commit of package obs-service-kiwi_label_helper for 
openSUSE:Factory checked in at 2020-07-15 11:11:35
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/obs-service-kiwi_label_helper (Old)
 and      /work/SRC/openSUSE:Factory/.obs-service-kiwi_label_helper.new.3060 
(New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "obs-service-kiwi_label_helper"

Wed Jul 15 11:11:35 2020 rev:3 rq:819506 version:0.0

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/obs-service-kiwi_label_helper/obs-service-kiwi_label_helper.changes
      2020-05-07 17:49:50.353185763 +0200
+++ 
/work/SRC/openSUSE:Factory/.obs-service-kiwi_label_helper.new.3060/obs-service-kiwi_label_helper.changes
    2020-07-15 11:11:49.884810065 +0200
@@ -1,0 +2,5 @@
+Tue Jul  7 14:42:29 UTC 2020 - Fabian Vogt <[email protected]>
+
+- Add explicit fallback for chroot builds
+
+-------------------------------------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ kiwi_label_helper ++++++
--- /var/tmp/diff_new_pack.ubWGjw/_old  2020-07-15 11:11:50.416810616 +0200
+++ /var/tmp/diff_new_pack.ubWGjw/_new  2020-07-15 11:11:50.416810616 +0200
@@ -1,5 +1,6 @@
 #!/bin/bash
 set -eu
+shopt -s nullglob
 
 if [ "${BUILD_DIST+x}" != "x" ]; then
        echo "Not running in an OBS build container"
@@ -7,21 +8,38 @@
 fi
 
 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
-RECIPEFILE="${RECIPEFILE##*:}"
+       # The build script renames the recipe (to strip _service:foo:), but 
doesn't update .data
+       RECIPEFILE="${RECIPEFILE##*:}"
 
-if [ "${RECIPEFILE##*.}" != "kiwi" ]; then
-       echo "Recipe is not a kiwi file - exiting"
-       exit 0
+       if [ "${RECIPEFILE##*.}" != "kiwi" ]; then
+               echo "Recipe is not a kiwi file - exiting"
+               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
 
-tmp=$(mktemp)
-if ! xsltproc /usr/lib/kiwi_label_helper/label_helper.xsl "${RECIPEFILE}" >> 
"${tmp}"; then
-       rm "${tmp}"
-       echo "xsltproc failed"
-       exit 1
-fi
+for file in "${files[@]}"; do
+       tmp="$(mktemp)"
+       if ! xsltproc /usr/lib/kiwi_label_helper/label_helper.xsl "${file}" >> 
"${tmp}"; then
+               rm "${tmp}"
+               echo "xsltproc failed"
+               exit 1
+       fi
 
-mv -f "${tmp}" "${RECIPEFILE}"
+       mv -f "${tmp}" "${file}"
+done


Reply via email to