Your message dated Sat, 16 Aug 2025 15:55:37 -0400 (EDT)
with message-id <[email protected]>
and subject line Bug#1110934: Removed package(s) from unstable
has caused the Debian Bug report #465144,
regarding grub-pc: Screws up "default" entry in menu.lst when 
updatedefaultentry is false
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
465144: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=465144
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: grub-pc
Version: 1.97~beta3-1
Severity: normal

Hi,

I've upgraded grub to grub-pc, which does some magic chainloading (on my
request). However, this screwed up my default entry in menu.lst, which
used to read "default saved" and now reads "default 0saved".

>From following the logic in /usr/lib/grub-legacy/update-grub, it seems
this is caused by updatedefaultentry not being set.

The following code parses the current default entry, including the setting of
use_grub_set_default. Note that this does not happen when updatedefaultentry is
false.

        #Finding the value the default line
        use_grub_set_default="false"
        if test "$updatedefaultentry" = "true" ; then
                defaultEntryNumber=$(sed -ne 
's/^[[:blank:]]*default[[:blank:]]*\(.*\).*/\1/p' $menu)

                if [ "$defaultEntryNumber" = "saved" ] ; then
                        defaultEntryNumber=$(sed 'q' "$grub_dir/default")
                        use_grub_set_default="true"
                fi

                if test -n "$defaultEntryNumber"; then
                        defaultEntryNumberPlusOne=$(expr $defaultEntryNumber \+ 
1);
                        defaultEntry=$(grep "^[[:blank:]]*title" $menu | sed 
-ne "${defaultEntryNumberPlusOne}p" | sed -ne 
";s/^[[:blank:]]*title[[:blank:]]*//p")
                        defaultEntry=$(echo $defaultEntry | sed -e 
"s/[[:blank:]]*$//") # don't trust trailing blanks   
                else
                        notChangeDefault="yes"
                fi
        else
                        notChangeDefault="yes"
        fi

Further down, the default number is updated in the generated menu.lst file. The
actual code for the non-grub2 case is removed. Note that if grub 2 is not being
installed, the default is not changed when notChangeDefault is set, which is
the case if updatedefaultentry is false (see the final else clause above).

        #Updating the default number
        if [ "$LET_US_TRY_GRUB_2" = "true" ] && test -f /boot/grub/core.img ; 
then
                set_default_value "0"
        elif test -z "$notChangeDefault"; then
                [ Code removed ]
        fi

This code uses the set_default_value function, which looks like:

        # Function to update the default value
        set_default_value() {
                if [ "$use_grub_set_default" = "true" ] ; then
                        if [ -f /usr/lib/grub-legacy/grub-set-default ] ; then
                                /usr/lib/grub-legacy/grub-set-default $1
                        else
                                grub-set-default $1
                        fi
                else
                        value="$1"
                        newmenu=$(tempfile)
                        sed -e 
"s/^[[:blank:]]*default[[:blank:]]*[[:digit:]]*\(.*\)/default         
${value}\1/;b" $menu > $newmenu
                        cat $newmenu > $menu
                        rm -f $newmenu
                        unset newmenu
                fi
        }

Here, the second half of the if contains a sed that matches numbers only (which
seems to make sense, since it only runs if use_grub_set_default is false,
right?). However, this breaks when the default config is "saved" and not a
number, which can occur as shown above.

To fix this, I'd probably change the first snippet above, to not check for
updatedefaultentry if LET_US_TRY_GRUB_2 is set. This might get complicated,
though, so perhaps something more elegant can be done?

Gr.

Matthijs

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.31-rc8 (PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages grub-pc depends on:
ii  debconf [debconf-2.0]       1.5.27       Debian configuration management sy
ii  grub-common                 1.97~beta3-1 GRand Unified Bootloader, version 
ii  libc6                       2.9-26       GNU C Library: Shared libraries
ii  ucf                         3.0022       Update Configuration File: preserv

grub-pc recommends no packages.

Versions of packages grub-pc suggests:
ii  desktop-base                  5.0.5      common files for the Debian Deskto
ii  genisoimage                   9:1.1.9-1  Creates ISO-9660 CD-ROM filesystem

-- debconf information excluded



--- End Message ---
--- Begin Message ---
Apologies; this wasn't sent as part of the dak rm action. I'm doing 
this by hand. Since this was manual, this opens the chance for me taking 
action by mistake.

I got the list of bugs via UDD, and am closing via -close on BCC. I spot 
checked about 10 of the bugs, and they're all src:grub. The COUNT 
matches the tracker page, so I'm sending this. 

If I have closed a bug that's not about bin:grub or src:grub, please do 
re-open the bug.

   paultag


We believe that the bug you reported is now fixed; the following
package(s) have been removed from unstable:

      grub |    0.97-84 | source
grub-legacy |    0.97-84 | amd64, i386

------------------- Reason -------------------
ROM; dead upstream, replaced by grub2
----------------------------------------------

Note that the package(s) have simply been removed from the tag
database and may (or may not) still be in the pool; this is not a bug.
The package(s) will be physically removed automatically when no suite
references them (and in the case of source, when no binary references
it).  Please also remember that the changes have been done on the
master archive and will not propagate to any mirrors until the next
dinstall run at the earliest.

Packages are usually not removed from testing by hand. Testing tracks
unstable and will automatically remove packages which were removed
from unstable when removing them from testing causes no dependency
problems. The release team can force a removal from testing if it is
really needed, please contact them if this should be the case.

We try to close bugs which have been reported against this package
automatically. But please check all old bugs, if they were closed
correctly or should have been re-assigned to another package.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected].

The full log for this bug can be viewed at https://bugs.debian.org/1110934

This message was generated automatically; if you believe that there is
a problem with it please contact the archive administrators by mailing
[email protected].

Debian distribution maintenance software
pp.
Paul Tagliamonte (the ftpmaster behind the curtain)

--- End Message ---

Reply via email to