Skip to contentSkip to conversation

Make clear that passing --grub-mkimage to grub-install is not supported.

PATCH In review Jon McCune 2 participants 3 messages Dec 2, 2013

lore
Share & tools
lore

Jon McCune

author
#0 lore raw

PATCH 1/1 Make clear that passing --grub-mkimage to grub-install is not supported.

A reasonable alternative would be to completely remove all traces of --grub-mkimage, and simply have it fail like any other unrecognized flag to grub-install, but this will not be as clear to those who may go looking for what has happened to --grub-mkimage.

---
 util/grub-install-common.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
util/grub-install-common.c +2 -1
index 03c6f13..fcb4d66 100644
@@ -359,7 +359,8 @@ grub_install_parse (int key, char *arg)
 	}
       grub_util_error (_("Unrecognized compression `%s'"), arg);
     case GRUB_INSTALL_OPTIONS_GRUB_MKIMAGE:
-      return 1;
+      grub_util_error (_("Option --grub-mkimage is no longer supported"));
+      return 0;
     default:
       return 0;
     }
Signature · 1 line
1.8.4.1
#1 lore raw
Quoted 5 lines · Jon McCune

A reasonable alternative would be to completely remove all traces of --grub-mkimage, and simply have it fail like any other unrecognized flag to grub-install, but this will not be as clear to those who may go looking for what has happened to --grub-mkimage.

The reason for this option was to specify where grub-mkimage is located. Your ways of using it were unsupported interface abuses. I have never seen any script abusing grub-mkimage such way (that is other than yours).

Quoted 20 lines
---
 util/grub-install-common.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
util/grub-install-common.c +2 -1
index 03c6f13..fcb4d66 100644
@@ -359,7 +359,8 @@ grub_install_parse (int key, char *arg)
 	}
       grub_util_error (_("Unrecognized compression `%s'"), arg);
     case GRUB_INSTALL_OPTIONS_GRUB_MKIMAGE:
-      return 1;
+      grub_util_error (_("Option --grub-mkimage is no longer supported"));
+      return 0;
     default:
       return 0;
     }
#2 lore raw
Quoted 10 lines · Vladimir 'φ-coder/phcoder' Serbinenko
Quoted 5 lines · Jon McCune

A reasonable alternative would be to completely remove all traces of --grub-mkimage, and simply have it fail like any other unrecognized flag to grub-install, but this will not be as clear to those who may go looking for what has happened to --grub-mkimage.

The reason for this option was to specify where grub-mkimage is located. Your ways of using it were unsupported interface abuses. I have never seen any script abusing grub-mkimage such way (that is other than yours).

Okay, nevermind this patch then.

-Jon