From 07f28089ae79e277cfd1260c7b94bb1803310f76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= Date: Fri, 17 Nov 2023 17:14:42 +0100 Subject: [PATCH] obsproduct: make source and debug packages optional --- Build/ObsProduct.pm | 9 ++++++--- build-recipe-obsproduct | 2 -- expanddeps | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Build/ObsProduct.pm b/Build/ObsProduct.pm index c0eeba7c2..85602ea10 100644 --- a/Build/ObsProduct.pm +++ b/Build/ObsProduct.pm @@ -87,9 +87,12 @@ sub parse { # can we live without additional repository config? - # currently always on - $ret->{'sourcemedium'} = 1; - $ret->{'debugmedium'} = 1; + # Do we need source or debug packages? + my $bo = $data->{'build_options'}; + if ($bo) { + $ret->{'sourcemedium'} = 1 if $bo->{'source'}; + $ret->{'debugmedium'} = 1 if $bo->{'debug'}; + } return $ret; } diff --git a/build-recipe-obsproduct b/build-recipe-obsproduct index 87cd41fa3..30ea7db97 100644 --- a/build-recipe-obsproduct +++ b/build-recipe-obsproduct @@ -58,8 +58,6 @@ recipe_prepare_obsproduct() { recipe_build_obsproduct() { echo "running obs product builder..." - chroot "$BUILD_ROOT" chown -R abuild.abuild "$TOPDIR" - extra_args="" if test -n "$RELEASE" ; then extra_args=" $extra_args --release $RELEASE" diff --git a/expanddeps b/expanddeps index 90140963a..547ceed6b 100755 --- a/expanddeps +++ b/expanddeps @@ -382,7 +382,7 @@ Build::readdeps($cf, undef, \%repo); my @sysdeps = Build::get_sysbuild($cf, $buildtype, $extrasysdeps); -if ($buildtype eq 'kiwi-image' || $buildtype eq 'kiwi-product') { +if ($buildtype eq 'kiwi-image' || $buildtype eq 'kiwi-product' || $buildtype eq 'obsproduct') { if (!shift @sysdeps) { print STDERR "expansion error\n"; print STDERR " $_\n" for @sysdeps;