From 708240f580b1d08b63333292cd7e8c2803f31340 Mon Sep 17 00:00:00 2001 From: Steve McIntyre <93sam@debian.org> Date: Fri, 19 Apr 2013 14:52:21 +0000 Subject: [PATCH] Add further support for missing win32-loader.ini. Closes: #705594 --- debian/changelog | 1 + tools/boot/squeeze/boot-x86 | 20 +++++++++++--------- tools/boot/wheezy/boot-x86 | 20 +++++++++++--------- 3 files changed, 23 insertions(+), 18 deletions(-) diff --git a/debian/changelog b/debian/changelog index 78464a59..0e8e84ae 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,7 @@ debian-cd (3.1.13) UNRELEASED; urgency=low * Use ARCHIVE_KEYRING_PACKAGE and ARCHIVE_KEYRING_FILE parameters to not hardcode debian-archive-keyring and let derivatives use their own keyring. + * Add further support for missing win32-loader.ini. Closes: #705594 -- Raphaƫl Hertzog Fri, 12 Apr 2013 10:32:56 +0200 diff --git a/tools/boot/squeeze/boot-x86 b/tools/boot/squeeze/boot-x86 index b7720276..2d49bf8f 100644 --- a/tools/boot/squeeze/boot-x86 +++ b/tools/boot/squeeze/boot-x86 @@ -285,15 +285,17 @@ else 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 diff --git a/tools/boot/wheezy/boot-x86 b/tools/boot/wheezy/boot-x86 index 04b58e34..29913048 100644 --- a/tools/boot/wheezy/boot-x86 +++ b/tools/boot/wheezy/boot-x86 @@ -300,15 +300,17 @@ else 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