v1 -> v2:

  - fixed changelog entry and commit message
  - adapted subarchitecture match
  - moved installation of hfsutils to grub-installer script

---
 debian/changelog                |  1 +
 debian/grub-installer.templates | 12 ++++++++++++
 grub-installer                  | 16 +++++++++++++++-
 3 files changed, 28 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index c69b48e..6f52346 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ grub-installer (1.147) UNRELEASED; urgency=medium
 
   [ Frank Scheiner ]
   * Query force-efi-extra-removable only when installing grub-efi*
+  * Install hfsutils in-target for powerpc/ppc64 newworld targets
 
  -- Frank Scheiner <frank.schei...@web.de>  Thu, 16 Nov 2017 07:20:38 +0100
 
diff --git a/debian/grub-installer.templates b/debian/grub-installer.templates
index e294afb..5f82c04 100644
--- a/debian/grub-installer.templates
+++ b/debian/grub-installer.templates
@@ -1,3 +1,15 @@
+Template: grub-installer/apt_install_hfsutils
+Type: text
+# :sl2:
+_Description: Installing hfsutils
+
+Template: grub-installer/apt_install_hfsutils_failed
+Type: error
+# :sl2:
+_Description: hfsutils installation failed
+ The hfsutils package failed to install into /target. Without it the NewWorld
+ boot partition cannot be formatted.
+
 Template: grub-installer/with_other_os
 Type: boolean
 Default: true
diff --git a/grub-installer b/grub-installer
index c433388..eb4d853 100755
--- a/grub-installer
+++ b/grub-installer
@@ -238,7 +238,21 @@ case $ARCH in
        ;;
     ppc64/chrp|ppc64/chrp_rs6k|ppc64/chrp_ibm|ppc64/cell)
        ;;
-    powerpc/*|ppc64/*)
+    powerpc/powermac_newworld|ppc64/powermac_newworld)
+       if ! apt-install hfsutils; then
+               error "Calling 'apt-install hfsutils' failed" 1>&2
+               # Hm, unable to install hfsutils into /target/, what should we 
do?
+               db_input critical grub-installer/apt_install_hfsutils_failed || 
[ $? -eq 30 ]
+               if ! db_go; then
+                       db_progress STOP
+                       exit 10 # back up to menu
+               fi
+               db_get grub-installer/apt_install_hfsutils_failed
+               if [ "$RET" != true ]; then
+                       db_progress STOP
+                       exit 1
+               fi
+       fi
        offs=$(findfs /boot/grub)
        [ -n "$offs" ] || error "GRUB requires that the OF partition is mounted 
in /boot/grub" 1>&2
        ;;
-- 
1.9.1

Reply via email to