Dear folks, Have a look at #479852, which has cost me a few hours of time. Arguably, it's because I didn't read the manpage, and that's true. However, I think there's an underlying issue which goes against my understanding of how Debian packages should do stuff, and thus I want to bring it up.
In a nutshell, python-central should default to DH_PYCENTRAL=noprepare, for reasons I outline below: python-jppy 0.0.44-1 was using python-central to manage byte-compiled files. It installed .py files to /usr/share/pyshared/jppy. Those would be symlinked to /usr/lib/python*/site-packages/jppy for all installed Python versions **by code installed to python-jppy.postinst by dh_pycentral**. I switched python-jppy to python-support with the 0.0.44-2 upload, and got some strange errors. I eventually traced those back to broken symlinks in /usr/lib/python*/site-packages/jppy, which 0.0.44-1 didn't remove on upgrade. Even though dh_pycentral installs code to put those symlinks in place on installation and upgrade, it only adds to prerm code that removes all symlinks on removal of the package, but not on upgrades. If a package removes files during an upgrade, python-central cleans up the symlinks to those files in the preinst of the new package (with pycentral pkgprepare). If the upgraded version of the package no longer uses python-central, it is responsible for cleaning up by calling pycentral pkgremove from its preinst — according to Matthias Klose (pycentral author), this doesn't need a pre-dependency on python-central if combined with a version check, because then one can assume that pycentral is still available. I confirmed that this works. From the dh_pycentral manpage and discussion with Matthias, this behaviour is in place to minimise the time during upgrades in which the Python modules would be unavailable. This behaviour could have been disabled, had I set DH_PYCENTRAL=noprepare in the 0.0.44-1 package. But I wasn't aware of the behaviour then, as I assumed that in Debian, every package cleans up after itself, and if python-central adds hooks to postinst which install files to /usr, that it also installs hooks to prerm to remove those files when they're no longer needed. I think anything but expecting packages to clean up after themselves is wrong, especially for Debian. If the package installs files due to a debhelper, that debhelper should be responsible for cleaning up after the package. If python-central supports minimising the inavailability of modules during an upgrade, that's a feature, but it should be optional. Thus, I say that noprepare should be the default behaviour, but doko would prefer not to: that could be an option; but I'd prefer not to do so. currently the admin/user sees the files disappearing/reappearing. it's "only" the packager who needs to take care about this (and only if python-central isn't used anymore for a new version of a package) This is a fair point, which makes me want to get your opinions. I feel that the current approach is error-prone and dirty and I'd like to see it handled better on a Debian system. But I am only I and have been known to err. So? -- .''`. martin f. krafft <[EMAIL PROTECTED]> : :' : proud Debian developer, author, administrator, and user `. `'` http://people.debian.org/~madduck - http://debiansystem.info `- Debian - when you have better things to do than fixing systems <n3tg0d> has /usr/bin/emacs been put into /etc/shells yet? :P
digital_signature_gpg.asc
Description: Digital signature (see http://martin-krafft.net/gpg/)