dpkg-divert -- How do I use it?
OK, so the programming manual _seems_ to be very clear:
For example, supposing that a smailwrapper package wishes to install
a wrapper around /usr/sbin/smail:
if [ install = "$1" ]; then
dpkg-divert --package smailwrapper --add --rename \
--divert /usr/sbin/smail.real /usr/sbin/smail
Testing $1 is necessary so that the script doesn't try to add the
diversion again when smailwrapper is upgraded.
But I _do_ want to at least install the diversion the first time
a user upgrades from libg++27-dev_...-4 (that didn't have eighter
the diversions or the files that it diverses) to revision -6,
that does have them. So, I removed the test for "$1", and
dpkg-divert nicely tells me the second time it it "Leaving diversion..."
So, I tried removing the libg++27-dev package, but now dpkg-divert
doesn't seem to be able to remove the diversions any more:
Removing `diversion of /usr/lib/libstdc++.so.27.2.1 to /usr/lib/libstdc++.so.27.2.1.stripped by libg++27-dev'
dpkg-divert: rename involves overwriting `/usr/lib/libstdc++.so.27.2.1' with
different file `/usr/lib/libstdc++.so.27.2.1.stripped', not allowed
I really don't know what that message means, of cource the
/usr/lib/libstdc++.so.27.2.1 and /usr/lib/libstdc++.so.27.2.1.stripped
file are different, that's why I divert them. And for the rest,
all the libs in /usr/lib are just the way I intended them to be.
So, what is wrong?
OH, BTW, I read that I'm not supposed to use divert on anything that
is critical to the system's operation. Is libg++ critical enough
not to be allowed to use dpkg-divert? I guess not (it's not essential
gdb needs unstripped shared libs, but they are about 1.5M bigger
than the stripped ones. So, I'd like to include the stripped
shared libs in libg++27, and the unstripped shared libs in
libg++27-dev (as described in a previous mail on debian-devel),
and I also would like libg++27 not to overwrite the upstripped
shared libs if I upgrad libg++27.
Use Debian/GNU Linux!
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-REQUEST@lists.debian.org . Trouble? e-mail to Bruce@Pixar.com