On Tue, Dec 16, 2003 at 05:06:48PM -0500, C. Scott Ananian wrote: > On Tue, 16 Dec 2003, Branden Robinson wrote: > > > Not true. dpkg-reconfigure always runs the given package's postinst > > script, if one is available. > > ah, see i'm not a dpkg expert. No problem. Neither am I, really. :) > > Sounds to me like you have modified this configuration file, and so the > > package maintainer scripts are trying not to clobber changes, just as > > dpkg tries not to clobber modified conffiles. > > yes, i understand this is how the xfree86 stuff works, but i didn't change > the configuration. This was a clean install, where i selected the wrong > driver at install time, and then ran dpkg-reconfigure to fix the problem. > But XF86Config-4 didn't get re-generated. > > I was, however, on MIPS. It is possible that there is an > architecture-specific component to this. > > Ah -- here's an interesting detail: the > /var/lib/xfree86/XF86Config-4.md5sum > file is *not present* on this machine. That would explain why the file > was never being overwritten. So the bug is simply that the md5sum file > isn't being created on a clean install. Or rather, clean upgrade from > stable. If an XF86Config-4 file was already present and appeared to be customized, the md5sum file *won't* be created. Please see the Debian X FAQ: http://people.debian.org/~branden/xsf/FAQ Debian X Window System Frequently Asked Questions (FAQ) List $Id: FAQ 697 2003-10-22 20:24:48Z branden $ [...] *) How do the XFree86 packages manage their non-conffile configuration files like /etc/X11/X, /etc/X11/Xwrapper.config, and /etc/X11/XF86Config-4? ("Conffile" is a Debian term for a configuration file that is shipped as part of a package's payload. Non-conffile configuration files are either not handled by the package system at all, or are created and removed by a package's maintainer scripts.) The method of non-conffile configuration file management that the Debian XFree86 packages used from approximately version 4.0.1-9 to 4.2.1-9 unfortunately proved to be too confusing for many users to tolerate. Each of these files has some corresponding state information in /var/lib/xfree86. The .md5sum files contain MD5 checksums, and the .roster files contain a list of packages that might write a new version of the configuration file. The Xwrapper.config and XF86Config-4 files' checksums are based upon their file contents. /etc/X11/X is a symbolic link, so its checksum is based on the output of the "readlink" command when run against that file. The checksums are stored in /var/lib/xfree86, and use the basename of the corresponding configuration file with the suffix ".md5sum". The post-installation scripts of the xserver-common, xserver-xfree86, and xserver-xfree86-dbg packages will not overwrite the aforementioned non-conffile configuration files if *any* of the following conditions is met: - the configuration file does not exist - the configuration file's checksum file does not exist - the configuration file's stored checksum does not match the one calculated when the post-installation script runs If *none* of the foregoing conditions are met, the configuration file is automatically updated, and if it has changed, its new MD5 checksum is written to the appropriate location in /var/lib/xfree86. The roster file is used simply to keep track of when it is safe to remove a non-conffile configuration file on package purge. As each package that is listed in a configuration file's roster is purged, that package's name is removed from the roster. When the last package name is removed, one final comparison between the configuration file's MD5 sum and the stored MD5 checksum is made, just as with the case when a configuration file is to be overwritten. If the same conditions are met under which the file would be rewritten (it exists, the checksum file exists, etc.), the file is removed. In any case, when the last package listed in a configuration file's roster is removed, the stored checksum file is removed. Therefore it is possible for a modified configuration file to remain on the system after all packages interested in potentially writing to it have been removed, and even their roster and checksum files are gone. This is regarded as the correct behavior because, by modifying the configuration file, the user has expressed his or her desire to have the packaging system abandon control of the file. It is expected that the XFree86 3.x Debian packages will be updated to work as above but as of this writing they retain the previous behavior, which attempts to use debconf markers to ascertain whether the /etc/X11/XF86Config file has been customized by the user. People writing installers for the Debian OS should note that pre-configuration of the XFree86 X server is now as simple as creating an /etc/X11/X symlink and /etc/X11/XF86Config file before installing the xserver-xfree86 package. The presence of these files causes the question priority of the package's debconf questions to be capped at "medium"; the files' existence is regarded as defining a "reasonable default" to the debconf questions (see debconf(7)). Therefore, setting the DEBIAN_PRIORITY environment variable to "high" will bypass the asking of all X server-related debconf questions, and the existence of the /etc/X11/X and /etc/X11/XF86Config-4 files in the absence of stored checksum files will prevent them from being overwritten by maintainer scripts. *) I've customized my /etc/X11/X, /etc/X11/Xwrapper.config, and/or /etc/X11/XF86Config-4 files so the packages don't automatically update them anymore. I'd like them automatically managed again, though; how can I achieve that? Please be aware that your local customizations will be *LOST* if you do this! Don't say you weren't warned... You can "trick" the packages into thinking that the versions of the configuration files on disk were written by them by replacing the MD5 checksum that they have associated with the file. /etc/X11/X is a bit of a special case because it is a symbolic link, not a file with contents. For /etc/X11/X, do the following as root: # readlink /etc/X11/X | md5sum > /var/lib/xfree86/X.md5sum # dpkg-reconfigure xserver-xfree86 (You may have xserver-xfree86-dbg installed instead, in which case, run dpkg-reconfigure on that package instead.) For /etc/X11/XF86Config-4, do the following as root: # md5sum /etc/X11/XF86Config-4 > /var/lib/xfree86/XF86Config-4.md5sum # dpkg-reconfigure xserver-xfree86 (You may have xserver-xfree86-dbg installed instead, in which case, run dpkg-reconfigure on that package instead.) For /etc/X11/Xwrapper.config, do the following as root: # md5sum /etc/X11/Xwrapper.config > /var/lib/xfree86/Xwrapper.config.md5sum # dpkg-reconfigure xserver-common Another way to accomplish the above is to purge the packages from your system and reinstall them, but that can be considerably more disruptive. Nevertheless, here's an example (like the commands above, it must be run as root): # dpkg --purge xserver-common xserver-xfree86 xserver-xfree86-dbg # apt-get install xserver-common xserver-xfree86 xserver-xfree86-dbg Omit one or more of the package names in these commands if you only want to use this method on some of the configuration files. xserver-common deals with /etc/X11/Xwrapper.config, and xserver-xfree86 and xserver-xfree86-dbg share /etc/X11/X and /etc/X11/XF86Config-4. -- G. Branden Robinson | Our ignorance is God; what we Debian GNU/Linux | know is science. branden@debian.org | -- Robert Green Ingersoll http://people.debian.org/~branden/ |
Attachment:
signature.asc
Description: Digital signature