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

Re: Failed Debian X installation



On Sun, Feb 24, 2002 at 07:51:35AM -0500, Michael O'Donnell wrote:
> ...I should also have mentioned that I found another directory
> named app-defaults within /usr/X11R6/lib/X11/app-defaults (ie.
> an /usr/X11R6/lib/X11/app-defaults/app-defaults) so I did the
> following and the installation now appears to have completed:
> 
>  mv /usr/X11R6/lib/X11/app-defaults /usr/X11R6/lib/X11/app-defaultsXXX
>  mv /usr/X11R6/lib/X11/app-defaultsXXX/app-defaults /usr/X11R6/lib/X11/app-defaults
> 
> ...so it could be the case that some script is trying to create
> the directory in question by saying something like
> 
>    mv .../someStagingDirectory/app-defaults /usr/X11R6/lib/X11/app-defaults
> 
> without checking if something by that name already exists.

Well, my packages don't do that:

xlibs.preinst:

if [ "$1" = "install" -o "$1" = "upgrade" ]; then
  # app-defaults and xkb directories moved in 4.0
  for DIR in app-defaults xkb; do
    if [ -e /usr/X11R6/lib/X11/$DIR -a ! -L /usr/X11R6/lib/X11/$DIR ]; then
      message "Note: Removing obsolete /usr/X11R6/lib/X11/$DIR directory."
      mv /usr/X11R6/lib/X11/$DIR /usr/X11R6/lib/X11/$DIR.moved-by-preinst
    fi
  done

xlibs.postinst:

# now safe to finish migrations started in preinst
for DIR in xkb app-defaults; do
  if [ -e /usr/X11R6/lib/X11/$DIR.moved-by-preinst -a -L /usr/X11R6/lib/X11/$DIR ]; then
    rm -r /usr/X11R6/lib/X11/$DIR.moved-by-preinst
  fi
done

# this can be placed in xlibs.links after woody releases
ln -sf /etc/X11/app-defaults /usr/X11R6/lib/X11/app-defaults || true

check_symlinks_and_bomb /usr/X11R6/lib/X11/xkb \
                        /usr/X11R6/lib/X11/app-defaults

-- 
G. Branden Robinson                |    Somebody once asked me if I thought
Debian GNU/Linux                   |    sex was dirty.  I said, "It is if
branden@debian.org                 |    you're doing it right."
http://people.debian.org/~branden/ |    -- Woody Allen

Attachment: pgp6mDMYwrxAv.pgp
Description: PGP signature


Reply to: