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

(grub2) pre-approval for bug reporting improvements



Hi,

The attached changes don't fix any end-user bug, but produce a very significant
improvement in the quality of the bug reports we will receive during lenny life
period (for example, #496040 and #489287 would have been much easier to triage
for us).

Besides, they are rather undisruptive;  so please consider pre-approving them.

Thanks

-- 
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."
r1027 | rmh | 2008-08-27 00:06:41 +0200 (dc, 27 ago 2008) | 3 lines

  * Remove a red herring error message so that the real errors are displayed
    (does not fix, but problem can be seen in #496040)
    - debian/patches/00_kern_device_red_herring.diff
------------------------------------------------------------------------
r1026 | rmh | 2008-08-26 22:40:48 +0200 (dt, 26 ago 2008) | 4 lines

  * Detect when grub-setup leaves core.img in filesystem, and include that
    info in bug report templates.
    - debian/patches/08_core_in_fs.diff
    - debian/script
------------------------------------------------------------------------

Index: debian/script
===================================================================
--- debian/script	(revision 1025)
+++ debian/script	(revision 1027)
@@ -1,5 +1,9 @@
 #!/bin/bash -e
 
+if test -e /boot/grub/grub_setup_left_core_image_in_filesystem ; then
+  echo -e "\n*********************** WARNING grub-setup left core.img in filesystem" >&3
+fi
+
 for i in /proc/mounts ; do
   if test -e $i ; then
     echo -e "\n*********************** BEGIN $i" >&3
Index: debian/patches/08_core_in_fs.diff
===================================================================
--- debian/patches/08_core_in_fs.diff	(revision 0)
+++ debian/patches/08_core_in_fs.diff	(revision 1027)
@@ -0,0 +1,31 @@
+Index: util/i386/pc/grub-setup.c
+===================================================================
+--- util/i386/pc/grub-setup.c	(revision 1828)
++++ util/i386/pc/grub-setup.c	(working copy)
+@@ -53,6 +53,7 @@
+ 
+ #define DEFAULT_BOOT_FILE	"boot.img"
+ #define DEFAULT_CORE_FILE	"core.img"
++#define CORE_IMG_IN_FS		"grub_setup_left_core_image_in_filesystem"
+ 
+ /* This is the blocklist used in the diskboot image.  */
+ struct boot_blocklist
+@@ -350,6 +351,8 @@
+ 			       boot_img))
+ 	    grub_util_error ("%s", grub_errmsg);
+ 
++	  unlink (DEFAULT_DIRECTORY "/" CORE_IMG_IN_FS);
++
+ 	  goto finish;
+ 	}
+       else
+@@ -365,6 +368,9 @@
+   /* The core image must be put on a filesystem unfortunately.  */
+   grub_util_info ("will leave the core image on the filesystem");
+   
++  fp = fopen (DEFAULT_DIRECTORY "/" CORE_IMG_IN_FS, "w");
++  fclose (fp);
++
+   /* Make sure that GRUB reads the identical image as the OS.  */
+   tmp_img = xmalloc (core_size);
+   core_path_dev = grub_util_get_path (DEFAULT_DIRECTORY, core_file);
Index: debian/patches/00_kern_device_red_herring.diff
===================================================================
--- debian/patches/00_kern_device_red_herring.diff	(revision 0)
+++ debian/patches/00_kern_device_red_herring.diff	(revision 1027)
@@ -0,0 +1,10 @@
+--- kern/device.c	2008-07-04 00:56:43.000000000 +0200
++++ kern/device.c.new	2008-08-26 23:44:32.000000000 +0200
+@@ -50,7 +50,6 @@
+   disk = grub_disk_open (name);
+   if (! disk)
+     {
+-      grub_error (GRUB_ERR_BAD_DEVICE, "unknown device %s", name);
+       goto fail;
+     }
+ 

Reply to: