Looking for advice on dpkg-diverted files
I have a situation I do not understand
- in woody, tetex-base installs the file dvipdfm.def into
/usr/share/texmf/tex/latex/graphics/, and the package dvipdfm also
installs the file, adding a dpkg diversion in its preinst (and
removing in postrm).
- in sarge and sid, tetex-base installs the same file, the content is
not changed compared to the woody tetex version.
- in sarge and sid, tetex-bin (which depends on tetex-base) provides the
functionality of dvipdfm, and should replace the package
completely. However, in earlier versions (which were both in unstable
and testing), tetex-bin did not correctly define its relationships to
dvipdfm: It declared "Replaces:" and "Provides:", but the "Conflicts:"
This has been corrected a while ago, so that upgrading from woody can be
done without problems.
However, if a user (who had dvipdfm installed previously) has been using
the buggy testing/sid versions of tetex-bin, he cannot upgrade without
previously removing dvipdfm manually.
It seems the difference is that as soon as a new (sarge/sid) version of
tetex-base is installed when dvipdfm's postrm is called, the dpkg-divert
Removing dvipdfm ...
Removing `diversion of /usr/share/texmf/tex/latex/graphics/dvipdfm.def to /usr/share/texmf/tex/latex/graphics/dvipdfm.def.tetex by dvipdfm'
dpkg-divert: rename involves overwriting `/usr/share/texmf/tex/latex/graphics/dvipdfm.def' with
different file `/usr/share/texmf/tex/latex/graphics/dvipdfm.def.tetex', not allowed
Why does dpkg-divert give this error? As far as I understood diversions,
it should not matter at all whether tetex-base has been upgraded
meanwhile, because dpkg should put tetex-base's new version into
dvipdfm.def.tetex. And when dvipdfm has been removed (i.e. just before
the postrm script is called), the file dvipdfm.def should not exist
So what is going wrong here? Why does it make a difference whether
tetex-base is upgraded before or after dvipdfm's removal?
By the way, you can easily reproduce this in a woody pbuilder
environment as follows:
1. install woody's tetex-base and dvipdfm (but not tetex-bin)
2. replace woody by sid in sources.list, apt-get update
3. install tetex-base (which only Replaces: dvipdfm)
(3.a encounter a bogus "File on system created by you or by a script."
message and a bogus error message from postinst, I know this yet.)
4. remove dvipdfm and get the error
Frank Küster, Biozentrum der Univ. Basel
Abt. Biophysikalische Chemie