Fix build script to handle missing devuan-keyring

- Added error detection for missing devuan-keyring package
- If devuan-keyring is missing, download it locally using apt-get download
- Retry the build after downloading the package
- This prevents build failure when devuan-keyring is not available
parent 24c53406
......@@ -35,12 +35,35 @@ if [ "$EUID" -ne 0 ]; then
fi
echo "Starting ISO build..."
lb build
lb build 2>&1 | tee build.log
if [ $? -eq 0 ]; then
BUILD_EXIT_CODE=$?
if [ $BUILD_EXIT_CODE -eq 0 ]; then
echo "Build completed successfully!"
echo "ISO file: $(ls live-image-amd64.iso 2>/dev/null || ls *.iso 2>/dev/null || echo 'Not found')"
else
echo "Build failed. Check the output above for errors."
exit 1
# Check if the error is about missing devuan-keyring
if grep -q "Couldn't find these debs: devuan-keyring" build.log; then
echo "Detected missing devuan-keyring. Downloading locally..."
if apt-get download devuan-keyring; then
echo "devuan-keyring downloaded successfully. Retrying build..."
rm -f build.log
lb build
if [ $? -eq 0 ]; then
echo "Build completed successfully!"
echo "ISO file: $(ls live-image-amd64.iso 2>/dev/null || ls *.iso 2>/dev/null || echo 'Not found')"
exit 0
else
echo "Build failed again. Check the output above for errors."
exit 1
fi
else
echo "Failed to download devuan-keyring. Build cannot continue."
exit 1
fi
else
echo "Build failed. Check the output above for errors."
exit 1
fi
fi
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment