Donovan Baarda wrote:
finding all packages that depend on "python" is non-trivial using only dpkg. Something like dpkg-awk, grep-dctrl, or python-apt make it much easier, but do we want to depend on them? The old "registry" idea would have made this a little easier, but I still prefer using the dpkg database to find this kind of info.
I prefer myself the way that packages like emacsen-common, mime-support, menu and I'm sure others do this: by having every package using Python and wanting to be recompiled install a script in (for example) /usr/share/python-central/packages/<packagename>, which can be called whenever .py files need recompiling. Alternatively, it could just be a configuration file with paths to the files to recompile.
Separate files that are part of the package would do the best job of existing only when the corresponding .py files are also unpacked.
It also makes it easier for users to modify if a Python package's dependencies are incorrect, and it stops compiling under a newer version of Python, making the whole dpkg run fail.
We only need to reconfigure/recompile when the default version of python upgrades to a different version of python, not minor package upgrades. Is there any way we can detect this and avoid un-necisary recompiles?
The python package itself knows from the arguments to its postinst, and could pass this on to python-central.
-- Carey