Skip to content

Commit

Permalink
Add milestone support in build-recipe-productcompose
Browse files Browse the repository at this point in the history
  • Loading branch information
mlschroe committed Dec 5, 2023
1 parent be24be0 commit e0858e8
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions build-recipe-productcompose
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,6 @@ recipe_setup_productcompose() {
fi
fi
chown -hR "$ABUILD_UID:$ABUILD_GID" "$BUILD_ROOT$TOPDIR"

if test -z "$ABUILD_TARGET"; then
ABUILD_TARGET=$(queryconfig target --dist "$BUILD_DIST" --configdir "$CONFIG_DIR" --archpath "$BUILD_ARCH" )
test -z "$ABUILD_TARGET" || echo "build target is $ABUILD_TARGET"
fi
}

recipe_prepare_productcompose() {
Expand All @@ -58,14 +53,32 @@ recipe_prepare_productcompose() {
recipe_build_productcompose() {
echo "running product composer..."

extra_args=""
local milestone=$(kiwi_query_recipe milestone)
extra_args=
if test -n "$RELEASE" ; then
extra_args=" $extra_args --release $RELEASE"
fi
if test -n "$BUILD_FLAVOR" ; then
extra_args=" $extra_args --flavor $BUILD_FLAVOR"
fi
chroot "$BUILD_ROOT" su -c "/usr/bin/product-composer build $extra_args -v --clean $TOPDIR/SOURCES/$RECIPEFILE $TOPDIR/PRODUCT" - abuild < /dev/null && BUILD_SUCCEEDED=true
pushd "$BUILD_ROOT/$TOPDIR/PRODUCT"
for i in * ; do
test -e "$i" || continue
case $i in
*.iso)
test -n "$milestone" && echo "$milestone" > $BUILD_ROOT/$TOPDIR/PRODUCT/${i%.iso}.milestone
;;
*.report)
test -n "$milestone" && echo "$milestone" > $BUILD_ROOT/$TOPDIR/PRODUCT/${i%.report}.milestone
;;
*)
test -d "$i" || continue
test -n "$milestone" && echo "$milestone" > $BUILD_ROOT/$TOPDIR/PRODUCT/${i}.milestone
;;
esac
done
popd
}

recipe_resultdirs_productcompose() {
Expand Down

0 comments on commit e0858e8

Please sign in to comment.