I reproduced udev's postrm,preinst,postinst scripts in a test package and found nothing weird in dpkg-divert's behaviour there.
I also tried reinstalling the udev package with a --reinstall --purge but that doesn't help:
root@stgraber-upgrade:~# apt-get install --reinstall --purge udev
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 1 not upgraded.
Need to get 0 B/416 kB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 107070 files and directories currently installed.)
Preparing to replace udev 166-0ubuntu6 (using .../udev_166-0ubuntu6_amd64.deb) ...
Adding 'diversion of /sbin/udevadm to /sbin/udevadm.upgrade by udev'
Unpacking replacement udev ...
Processing triggers for ureadahead ...
Processing triggers for man-db ...
Setting up udev (166-0ubuntu6) ...
udev start/running, process 9218
Removing 'diversion of /sbin/udevadm to /sbin/udevadm.upgrade by udev'
update-initramfs: deferring update (trigger activated)
Processing triggers for initramfs-tools ...
update-initramfs: Generating /boot/initrd.img-2.6.38-7-generic
root@stgraber-upgrade:~# debsums -sa udev
debsums: changed file /sbin/udevadm (from udev package)
Stracing apt-get shows the following:
- /sbin/udevadm gets diverted to /sbin/udevadm.upgrade
- /sbin/udevadm gets created (shell script)
- /sbin/udevadm gets updated with the new file (and not udevadm.upgrade)
- /sbin/udevadm.upgrade gets undiverted to /sbin/udevadm (thereby restoring the old binary)
I reproduced udev's postrm, preinst, postinst scripts in a test package and found nothing weird in dpkg-divert's behaviour there.
I also tried reinstalling the udev package with a --reinstall --purge but that doesn't help:
root@stgraber- upgrade: ~# apt-get install --reinstall --purge udev 166-0ubuntu6_ amd64.deb) ... upgrade by udev' upgrade by udev' img-2.6. 38-7-generic upgrade: ~# debsums -sa udev
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 1 not upgraded.
Need to get 0 B/416 kB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 107070 files and directories currently installed.)
Preparing to replace udev 166-0ubuntu6 (using .../udev_
Adding 'diversion of /sbin/udevadm to /sbin/udevadm.
Unpacking replacement udev ...
Processing triggers for ureadahead ...
Processing triggers for man-db ...
Setting up udev (166-0ubuntu6) ...
udev start/running, process 9218
Removing 'diversion of /sbin/udevadm to /sbin/udevadm.
update-initramfs: deferring update (trigger activated)
Processing triggers for initramfs-tools ...
update-initramfs: Generating /boot/initrd.
root@stgraber-
debsums: changed file /sbin/udevadm (from udev package)
Stracing apt-get shows the following: upgrade upgrade gets undiverted to /sbin/udevadm (thereby restoring the old binary)
- /sbin/udevadm gets diverted to /sbin/udevadm.
- /sbin/udevadm gets created (shell script)
- /sbin/udevadm gets updated with the new file (and not udevadm.upgrade)
- /sbin/udevadm.
Strace attached (look for udevadm.upgrade)