[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#705594: Add further support for missing win32-loader.ini



Package: debian-cd
Version: 3.1.12

In boot-x86 there is already two checks for the existence of win32-loader.ini, the attached patch file adds the missing third check.

Without this patch the tail end of the build log for the multi-arch ISO shows:

Using newer EFI support in xorriso 10206
  (Optionally) making the image bootable for i386:
Running tools/boot/wheezy/boot-i386 1 /home/idms/build.wheezy/tmp/wheezy/CD1
  Using ISOLINUX boot-disks image on CD1
sed: can't read boot1/win32-loader.ini: No such file or directory
      FAILED: error 2
    Failed to start disc 1, error 512
make: *** [image-trees] Error 9

I'm making a custom server netinstall ISO, so there are no MS Windows files and no need for them.

--
Robert Spencer
--- tools/boot/squeeze/boot-x86~	2011-02-22 20:52:44.000000000 +0000
+++ tools/boot/squeeze/boot-x86	2013-04-10 13:17:30.000000000 +0000
@@ -285,15 +285,17 @@
 		sed -i "4 s/^$/(note: i386 is default; prepend 'amd64-' to use an amd64 kernel instead)/" $file
 	done
 
-	# Modify win32-loader.ini to also cover the "other" arch
-	if [ "$ARCH" = i386 ]; then
-		sed -i -e "/^arch=/d
-				   /^i386\//p; s/^i386/amd64/; s/=$INSTALLDIR_i386/=$INSTALLDIR_amd64/g" \
-				       boot$N/win32-loader.ini
-	else
-		sed -i -e "/^arch=/d
-				   /^amd64\//p; s/^amd64/i386/; s/=$INSTALLDIR_amd64/=$INSTALLDIR_i386/g" \
-				       boot$N/win32-loader.ini
+	if [ -e boot$N/win32-loader.ini ]; then
+		# Modify win32-loader.ini to also cover the "other" arch
+		if [ "$ARCH" = i386 ]; then
+			sed -i -e "/^arch=/d
+					   /^i386\//p; s/^i386/amd64/; s/=$INSTALLDIR_i386/=$INSTALLDIR_amd64/g" \
+					       boot$N/win32-loader.ini
+		else
+			sed -i -e "/^arch=/d
+					   /^amd64\//p; s/^amd64/i386/; s/=$INSTALLDIR_amd64/=$INSTALLDIR_i386/g" \
+					       boot$N/win32-loader.ini
+		fi
 	fi
 
 	# Apply workaround for #505243
--- tools/boot/wheezy/boot-x86~	2013-03-24 20:13:25.000000000 +0000
+++ tools/boot/wheezy/boot-x86	2013-04-10 13:15:37.000000000 +0000
@@ -300,15 +300,17 @@
 		sed -i "4 s/^$/(note: i386 is default; prepend 'amd64-' to use an amd64 kernel instead)/" $file
 	done
 
-	# Modify win32-loader.ini to also cover the "other" arch
-	if [ "$ARCH" = i386 ]; then
-		sed -i -e "/^arch=/d
-				   /^i386\//p; s/^i386/amd64/; s/=$INSTALLDIR_i386/=$INSTALLDIR_amd64/g" \
-				       boot$N/win32-loader.ini
-	else
-		sed -i -e "/^arch=/d
-				   /^amd64\//p; s/^amd64/i386/; s/=$INSTALLDIR_amd64/=$INSTALLDIR_i386/g" \
-				       boot$N/win32-loader.ini
+	if [ -e boot$N/win32-loader.ini ]; then
+		# Modify win32-loader.ini to also cover the "other" arch
+		if [ "$ARCH" = i386 ]; then
+			sed -i -e "/^arch=/d
+					   /^i386\//p; s/^i386/amd64/; s/=$INSTALLDIR_i386/=$INSTALLDIR_amd64/g" \
+					       boot$N/win32-loader.ini
+		else
+			sed -i -e "/^arch=/d
+					   /^amd64\//p; s/^amd64/i386/; s/=$INSTALLDIR_amd64/=$INSTALLDIR_i386/g" \
+					       boot$N/win32-loader.ini
+		fi
 	fi
 
 	# Apply workaround for #505243

Reply to: