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

Dimitri John Ledkov dimitri.ledkov at canonical.com
Mon Feb 27 14:49:52 UTC 2023


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 at canonical.com>
---
 debian/scripts/dkms-build | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

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.
-- 
2.34.1




More information about the kernel-team mailing list