Is there a preferred or easy way to test proposed modifications to maintainer scripts, particularly config and preinst scripts which are run before the package is installed, on existing built packages at the time of installation? There is a small handful of config/preinst bugs that I'd like to try to fix and that would require modifying config or preinst scripts.
For config scripts, in the absence of something pre-existing, one approach that looks like it would work pretty easily would be to replace apt-extracttemplates (which is called by dpkg-preconfigure) with something that would check a magic directory for replacement scripts for a package and use those instead of the real ones if they exist. Then if I wanted to mess around with editing config scripts, I could run apt-extracttemplates by hand, copy the resulting files into this directory, and edit them freely. Then the next time I install the package (after dpkg --purge) I'll see the modified scripts instead. Something similar could probably be done for preinst though I haven't looked at exactly where in the process this happens. For what it's worth, I've also looked at running scripts by hand with /usr/bin/debconf, but that doesn't solve the whole problem. For example, debconf-devel(7) discusses using debconf-loadtemplate and running scripts by hand with debconf(1), but this addresses only debconf issues, not other issues with config or preinst scripts. Gratuitous comments: I'm posting this question to debian-mentors because I think it's too far toward development to post to debian-users, and too much of a newbie question for debian-devel. It seems like this is something that most developers who maintain packages with configure scripts would probably have to do from time to time, so it seems worth asking before reinventing the wheel. If you think I've misjudged where to ask this question, I'd like to know. Also, I've looked in various documents for an answer to this question and haven't found anything. If this issue is spelled out somewhere, a pointer would be appreciated. The apt.conf and debconf-devel documentation have lots of hints, but nothing that looks easier than the approach I'm planning on trying. -- Jay Berkenbilt <[EMAIL PROTECTED]> http://www.ql.org/q/ -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]