reopen 520690
thanks

Hi,

1) This bug still affects lenny, an update to lenny-p-u would be nice.
2) I think the fix is still wrong:

+    if test -L "$dir/$1" ]; then
+        # If we were using links, continue to use links, updating if
+        # we need to.
+        if [ "$(readlink -f ${dir}/${1})" = "${dir}/${1}-${ver}" ]; then
+            # Yup, we need to change
+            ln -sf "$1-$ver.old" "$dir/$1.old"
+            ln -sf "$1-$ver" "$dir/$1"
+        fi
+    else                        # No links

Say we're installing 2.6.27.20 and the previously installed kernel was
2.6.27.20, with symlinks in /boot. We have
"if test -L "/boot/vmlinuz" -> true
readlink -f /boot/vlinuz -> /boot/vmlinuz-2.6.27.20
if [ "$(readlink -f /boot/vmlinuz)" = "/boot/vmlinuz-2.6.27.20" ] -> true
ln -sf "vmlinuz-2.6.27.20.old" "/boot/vmlinuz.old" -> OK
ln -sf "vmlinuz-2.6.27.20" "/boot/vmlinuz" -> unneeded, but harmless

Now, if we install a different version from the one already installed,
we won't update the symlinks at all, because the readlink test will
fail and nothing else will happen.

I think the following would be a better fix:

    if test -L "$dir/$1" ]; then
        # If we were using links, continue to use links, updating if
        # we need to.
        if [ "$(readlink -f ${dir}/${1})" = "${dir}/${1}-${ver}" ]; then
            # Yup, we need to change
            ln -sf "$1-$ver.old" "$dir/$1.old"
        else
            mv "$dir/$1" "$dir/$1.old"
            ln -sf "$1-$ver" "$dir/$1"
        fi
    else                        # No links

HTH

T-Bone



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to