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

More on svgalib



Peter,

I've had a close look at the svgalib preinst that is responsible for
moving the config files around and can't figure out how it managed to
produce the behaviour you described.  Can you tell me what the a.out
svgalib on your system was before you attempted to upgrade?

I intend that 1.28-5 will have the preinst at the end of the message -
it's slightly different from 1.28-3, but ought to behave the same way.
Given that 1.28-[34] don't act sanely, can someone have a look and see
if they think it is sane?  I don't have time to do a build and upload
this evening, I'm afraid.

The behaviour Peter observed was that he ended up with the following
under /etc/vga:

lrwxrwxrwx   1 root     root           17 Feb 21 02:46 libvga.config -> vga/libvga.config
-rw-r--r--   1 root     root         1789 Feb  3 03:36 libvga.config.dpkg-new
lrwxrwxrwx   1 root     root           17 Feb 21 02:46 libvga.et4000 -> vga/libvga.et4000
-rw-r--r--   1 root     root         4715 Feb  3 03:36 libvga.et4000.dpkg-new

The *.dpkg-new files are probably irrelevant to this, once we've
established where the symlinks come from.  The symlinks have the
correct value for the corresponding names under /etc, but we should be
seeing real files under /etc/vga.

#!/bin/sh
set -e
#
# shift config files around
#
if [ ! -d /etc/vga ]
then
  mkdir /etc/vga
  chmod 755 /etc/vga
fi
for file in libvga.config libvga.et4000 # libega.config
do
  if [ -L /etc/vga/$file ]
  then
    # if their are symlinks under /etc/vga, remove them
    # this should not happen unless some previous version fucked up
    rm /etc/vga/$file
  fi
  if [ -L /etc/$file ]
  then
    # if there's a symlink directly under /etc, we delete it so that
    # the current state is known.
    rm /etc/$file
  elsif [ -f /etc/$file ]
  then
    # If there's a regular file under /etc, we move it to the right
    # place
    mv /etc/$file /etc/vga/$file
  elsif [ -e /etc/$file ]
  then
    # if there's anything else there then we can't sanely continue
    echo Bogus /etc/$file detected:
    ls -l /etc/$file
    exit 1
  fi
  # make the name under /etc be a symlink to the correct location
  ln -s vga/$file /etc/$file
done


Reply to: