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

Bug#376765: dpkg-reconfigure xserver-xorg issues strange warning about /etc/X11/X



> I have seen the same after a new installation recently and was very
> confused by this same message:
> - I did not change the config manually at all, so the error was false
>   and the configuration should have been updated

Hi.

I'm really confused by this message too. I'm looking at the code, and, at 
least, I think I've found some lines that are not correct.

I don't fully understand the purpose of lines 1631 to 1637 of 
xserver-xorg.postinst (in version 1:7.0.23), and it seems I'm not the only 
one (see the comment "why, why, why, why, why, why, why are we md5suming 
this? -daniels") but there are some obvious errors: the md5sums, are 
calculated not on the file, but on the _name_ of the file. See the attached 
patch.

However, someone with more knowledge of X should check why this md5sum is 
calculed. First, is checked if the symlink points to the server in the old 
paths, and if it's true, is migrated, _and_ again is checked that the md5sum 
of the symlink matches the old files. This would never be true, because the 
symlink has been moved in the previous lines, isn't it?

> - what does /etc/X11/X have to do with it anyway, after all I want to
>   update /etc/X11/xorg.conf when I reconfigure, not /etc/X11/X

I don't know if it's related or not (I suppose that not), but I'm having this 
problem too. I can't configure X automatically with dpkg-reconfire 
xserver-xorg, as expected. Maybe it's related to #380061.

-- 
Alex (a.k.a. suy) - GPG ID 0x0B8B0BC2
http://barnacity.net/ - Jabber ID: suy@bulmalug.net
--- /var/lib/dpkg/info/xserver-xorg.postinst	2006-08-12 22:35:44.000000000 +0200
+++ xserver-xorg.postinst	2006-08-14 12:54:01.666515250 +0200
@@ -1619,20 +1619,20 @@
 # not exist.  otherwise, assume that's the way the user wants it.
 if [ -L "$SERVER_SYMLINK" ] || ! [ -e "$SERVER_SYMLINK" ]; then
   # migrate from old symlinks.
-  if [ "$(readlink /etc/X11/X)" = "/usr/X11R6/bin/Xorg" ] || \
-     [ "$(readlink /etc/X11/X)" = "/usr/bin/X11/Xorg" ] || \
-     [ "$(readlink /etc/X11/X)" = "/bin/true" ]; then
-    rm /etc/X11/X
-    ln -s $THIS_SERVER /etc/X11/X
+  if [ "$(readlink "$SERVER_SYMLINK")" = "/usr/X11R6/bin/Xorg" ] || \
+     [ "$(readlink "$SERVER_SYMLINK")" = "/usr/bin/X11/Xorg" ] || \
+     [ "$(readlink "$SERVER_SYMLINK")" = "/bin/true" ]; then
+    rm $SERVER_SYMLINK
+    ln -s $THIS_SERVER $SERVER_SYMLINK
   fi
   # compare the current and stored checksums; if they do not match, assume
   # that's the way the user wants it.
   # why, why, why, why, why, why, why are we md5suming this? -daniels
-  if [ "$(readlink "$SERVER_SYMLINK" | md5sum)" = \
+  if [ "$(md5sum `readlink "$SERVER_SYMLINK"`)" = \
        "$(cat "$SERVER_SYMLINK_CHECKSUM")" ] || \
-     [ "$(echo "/usr/X11R6/bin/Xorg" | md5sum)" = \
+     [ "$(md5sum /usr/X11R6/bin/Xorg)" = \
        "$(cat "$SERVER_SYMLINK_CHECKSUM")" ] || \
-     [ "$(echo "/usr/bin/X11/Xorg" | md5sum)" = \
+     [ "$(md5sum /usr/bin/X11/Xorg)" = \
        "$(cat "$SERVER_SYMLINK_CHECKSUM")" ] || \
      ! [ -e "$SERVER_SYMLINK" ]; then
     # finally, only update the symlink if this package contains the

Reply to: