[Pkg-mediawiki-devel] Bug#388616: Upgrade
Frank Küster
frank at kuesterei.ch
Wed Feb 21 12:54:38 CET 2007
Hi Romain, hi release team,
maybe I really missed something, but let's discuss this. Would the
approach I suggest below be okay for the release team?
Romain Beauxis <toots at rastageeks.org> wrote:
>> Alternatively, you could just as well fix it.
[...]
>> All nothing that requires magic.
>
> Exept that you forgot to mention how you will modify the configuration file to
> change the $IP in /etc/mediawiki1.7/LocalSettings.php
I don't see the problem here. Currently with the file being in
/var/lib/mediawiki1.7, the file is created by the local admin and moved
to its place. He can as well move it to /etc/mediawiki1.7, and the
package or its maintainer scripts need not care about it in the future.
> And also how you will handle the move from /var/lib/mediawiki1.7
> to /etc/mediawiki1.7: with or without notifing the administrator ?
> Then of course it needs a debconf warning.
This is in fact a problem. Let's look at the cases:
a) Default install, symlink from /etc/mediawiki1.7/ to /var/...
In this case we can just move the file from /var to /etc if it exists
and do nothing if it doesn't (for both files). This would be done in
preinst, so that we can ship the symlink in the new deb.
b) The symlink is removed
Literally, Policy requires us to respect local configuration changes
including file removals. However, I'd argue that removing the old,
buggy symlink is not a configuration change (it didn't change
anything), and I would move existing files from /var to /etc without
a debconf note (i.e. handle this case like a default install).
c) There is a real file instead of the symlink
Subcase 1) No file in /var
no problem here, the preinst does nothing and the symlink from the
deb is installed (probably it's already there, but I think dpkg
will not complain). Suddenly the wiki will work; I don't think
this needs a debconf note.
Subcase 2) also a file in /var
This means that there is both a configuration file that is actually
used and one that the admin obviously intended to be used. In this
case I would say the preinst should take a diff of the files and
just remove the one in /var if they are the same. If they are not,
it could move the file from /var to
/etc/mediawiki1.7/LocalSettings.php.moved-from-var. The config
script would check for the existence of that file and if it finds
it, ask which one to use (and the postinst would act accordingly).
Plus a NEWS.Debian explaining the changes.
To me that looks a bit more complicated than one would like, but still
quite manageable, and acceptable for fixing a RC bug in etch.
What do you think?
Regards, Frank
--
Dr. Frank Küster
Single Molecule Spectroscopy, Protein Folding @ Inst. f. Biochemie, Univ. Zürich
Debian Developer (teTeX/TeXLive)
More information about the Pkg-mediawiki-devel
mailing list