Package: grub-pc
Version: 1.96+20080724-14
Severity: serious
Tags: patch

Hi,

When gnumach is installed grub-pc fails to install due to at least the
missing function make_system_path_relative_to_its_root. Also afterwards
it aborts if it cannot find the needed stuff to successfully boot a Hurd
system, which should not be fatal on non Hurd systems. The attached
patch fixes those problems.

For upstream submission you might want to replace the dpkg invokation
with uname.

regards,
guillem
diff --git a/util/grub.d/10_hurd.in b/util/grub.d/10_hurd.in
index d437873..902718d 100644
--- a/util/grub.d/10_hurd.in
+++ b/util/grub.d/10_hurd.in
@@ -16,6 +16,11 @@
 # You should have received a copy of the GNU General Public License
 # along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
 
+pref...@prefix@
+exec_pref...@exec_prefix@
+libd...@libdir@
+. ${libdir}/grub/update-grub_lib
+
 if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
   OS=GNU
 else
@@ -60,7 +65,12 @@ fi
 
 if ${all_of_them} && test -e /lib/ld.so.1 ; then : ; else
   echo "Some Hurd stuff found, but not enough to boot." >&2
-  exit 1
+  # this is only fatal on Hurd systems
+  if dpkg --print-architecture | grep -q '^hurd-' ; then
+    exit 1
+  else
+    exit 0
+  fi
 fi
 
 prepare_grub_to_access_device ${GRUB_DEVICE}

Reply via email to