diff mbox series

[lunar:linux,lunar:linux-unstable,v2,2/3] UBUNTU: [Packaging] Preserve the correct log file variable value

Message ID 20230227144953.935987-3-dimitri.ledkov@canonical.com
State New
Headers show
Series [lunar:linux,lunar:linux-unstable,v2,1/3] UBUNTU: [Packaging] Support skipped dkms modules | expand

Commit Message

Dimitri John Ledkov Feb. 27, 2023, 2:49 p.m. UTC
In successful builds, ensure that log variable remains set to the
correct value, such that further processing can be done on it for the
lrm builds.

Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
---
 debian/scripts/dkms-build | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/debian/scripts/dkms-build b/debian/scripts/dkms-build
index 6690322476..f85a6557a8 100755
--- a/debian/scripts/dkms-build
+++ b/debian/scripts/dkms-build
@@ -171,7 +171,10 @@  $fakeroot /usr/sbin/dkms build --no-prepare-kernel --no-clean-kernel \
 # Find the log and add it to our own.
 for log in "$dkms_dir/build/$dkms_package/$dkms_version/$abi_flavour"/*/"log/make.log" "$dkms_dir/build/$dkms_package/$dkms_version/build/make.log"
 do
-	[ -f "$log" ] && sed -e "s@$dkms_dir@<<DKMSDIR>>@g" <"$log"
+	if [ -f "$log" ]; then
+		sed -e "s@$dkms_dir@<<DKMSDIR>>@g" <"$log"
+		break
+	fi
 done
 
 # If this build failed then exit here.