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

Re: X11 failled to run (was: H1 images - comments and questions)

On Mon, Nov 26, 2001 at 08:11:17PM +0000, Joshua Rosen wrote:
> Niels Möller writes:
> >Moritz Schulte <moritz@duesseldorf.ccc.de> writes: 

> >Or move the stuff to /usr/lib. Simply making /usr/X11R6/lib a symlink
> >to /usr/lib before installing the X packages might work.
> I did something like that, recently, and it's causing me trouble:
> I moved everything under /usr/X11R6 to the corresponding directories under 
> /usr (since /usr is a symlink to ".", it's really the corresponding 
> directories under /) and made /X11R6 another symlink to ".". 
> Now, attempts to upgrade XFree86 from new debs fail, as the 
> installation-scripts see what I've done and decide that it's not kosher. 

See wishlist Bug#114625 that I filed a while ago after doing exactly that
on my Hurd install.  All the binaries (and libraries!) work, but the package
management scripts get confused.

Since filing the bug I've looked into the problem a little more closely and
found that the trouble lies in the fact that /usr/bin/X11, /usr/include/X11
and /usr/lib/X11 are all symlinks included in the xfree86-base package (they
point to ../X11R6/bin, ../X11R6/include/X11, and ../X11R6/lib/X11
respectively).  When you move all the files out of /usr/X11R6, you have to
delete those symlinks (as the real directories will now go there).

I've looked at the posibility of changing that package to create the
symlinks in the maintainer scripts, but it seems a bit tricky to get the
relative links right (though I'm not a very good shell script hacker).  I
imagine the change would require checking that the two locations
(/usr/FOO/X11 and /usr/X11R6/FOO/X11) refer to the same place (probably
using readlink(1) with the -f option which calls realpath(3)), and if not,
creating the proper symlink.

For your reference, I've attached the xfree86-common.preinst script.  The
problem lies in the use of the maplink function in the check_symlinks_and_*
functions.  That would all have to be significantly modified.

If no one else gets this fixed, I may work on this a bit more after my
finals are out of the way (in three weeks).

Steven Barker                                      scbarker@uiuc.edu
  A penny saved is ridiculous.
Get my GnuPG public key at: http://www.blckknght.org/pubkey.asc
Fingerprint: 272A 3EC8 52CE F22B F745  775E 5292 F743 EBD5 936B

Reply to: