Fabrizio: > Anyway [a] proposal was harshly rejected with the assertion that "dpkg > have problems with symlinks to directories", argument that I can't > debate. Maybe now that Klee and Ian have time again for Debian, we > could hear a more informed opinion.
I am here, honest. Technical details: Basically, dpkg will _follow_ symlinks when installing packages. So if a package contains /usr/share/doc/foo/bar and /usr/share/doc is a link to /usr/doc then dpkg will install the file in /usr/doc/foo/bar (but record it as being installed as /usr/share/doc/foo/bar). Likewise, if /usr/doc is a link to /usr/share/doc and a package contains /usr/doc/foo/bar then dpkg will install it in /usr/share/doc/foo/bar (but record it as /usr/doc/foo/bar). dpkg will not replace a directory with a symlink, nor will it replace a symlink to a directory with a directory. The intent is that packages with both locations for a directory can coexist, provided the right symlinks are in place; dpkg won't handle moving the directory - that has to be done by scripts - but it will `do as it is told' by the filesystem. The best first thing to do is probably to make a version of base-files that has links from the _new_ names to the _old_ ones, once we decide what things we're going to change and how. Then packages can start containing the new layout provided that they say `Pre-Depends: base-files (>= whatever)'. dpkg will then install the stuff in the old locations. When most of our packages are converted we can release a version of base-files which contains the opposite situation: the new directories and old links. That will make newly-installed systems have the new layout and old systems have the old, and both old and new packages will work on either. Later we can have a version of base-files whose postinst switches the directories and links around. This script has to be written with some care, and will inevitably leave the system in a very bad state for a few instants while it's running because of the lack of an atomic `change all of this' operation in the filesystem. However, if written with a good deal of care it could minimise the time during which the system is in this bad state, and it can probably be made very-nearly idempotent, so that only users whose systems crash during a very small interval will suffer problems. In the far future we can remove the compatibility links from base-files. This has to be considered carefully, because after those links are gone installing an old package will make `duplicate' instances of the moved directories. Ian.