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

Re: XFree86 4.0.1 and app-defaults



[ Talking about /usr/X11R6/lib/X11/app-defaults directory, which is
  planned to be a symlink to /etc/X11/app-defaults. ]
> *HOWEVER*, dpkg's databases will contain bogus information about the
> locations of files installed to that directory.  So it is imperative that
> these packages have new versions that will clean up the mess.

Hmm. What bogus information will dpkg have? If my package foo installs
an app-defaults file in the old directory now, after the directory is
forcibly moved to /etc, dpkg will still think the file is
/usr/X11R6/lib/X11/app-defaults/foo. dpkg follows symlinks, so even if I
release a new version of my package that contravenes the proposed policy
and still uses /usr/X11R6/lib/X11/app-defaults/foo, dpkg will replace that
file without complaint.

I can only identify two problems:

* dpkg -S /etc/X11/app-defaults/foo will fail.
* If some other package also contains an app-defaults file named foo,
  but puts in in /etc/X11/app-defaults/foo, strange things could happen
  if both packages are installed.

Note that both problems can happen even if we adopt your proposed policy
and everyone follows it to the letter, in the following situation:

* I upgrade to woody, new X, and upgrade all the app-defaults-containing
  packages.
* I then decide I like potato's version of one of those packages better,
  and downgrade to it. Nothing prevents me from doing this after all.

I also have a bit of an alternate idea, which goes like this. You
mention a few things:

> Things will break spectacularly if that symlink doesn't exist.

> + All packages that ship stuff in /usr/X11R6/lib/X11/app-defaults are X
>   clients.
> + X clients depends on the X libraries.  (Exceptions to this in the Debian
>   system do not exist in practice, unless we have any programs written in 
>   Common Lisp and using CLX.  I don't think we do.)

Ok, so all packages that have app-defaults files link to the X
libraries. I assume one of those libraries is responsible for reading
the app-defaults file[1]. And some horrible thing you haven't specified will
happen if an app cannot read its app-defaults file.

So, why not hack X[2]? Make the library look in /etc/X11/app-defaults, then
in the old location. Make policy that states that packages depending on the
X 4 version of that library should use /etc/X11/app-defaults. Such a
package would break if it were installed onto a system with an older
xlib, but the dependancy will prevent that. Upgrades and downgrades will
work without any messy difficulties. You can remove the xlib hack in a
release or two.

-- 
see shy jo

[1] Verified, that is lib/Xt/Initialize.c, XtScreenDatabase()
[2] And yeah I looked at the code and it looks doable. Insert a check for
    a file in the old directory around line 534 of the file in [1].



Reply to: