Univention Bugzilla – Bug 28750
Diversions sind nicht lokal; verwenden DPKG_MAINTSCRIPT_PACKAGE=univention-config
Last modified: 2012-12-12 21:08:17 CET
Durch Arbeiten an Bug #19145 ist gerade aufgefallen, daß "ucr" die eingerichteten Diversions nicht länger als "lokale Umleitung" einrichtet, sondern als "Paket univention-config"-Umleitung. Das führt (teilweise) zu dem Problem, das sich Diversions nicht mehr automatisch entfernen lassen, weil es beim "remove" zu Fehlern kommt, die nach /dev/null umgeleitet werden: # ucr update dpkg-divert: error: mismatch on package when removing `diversion of /etc/dhcp3/dhclient.conf to /etc/dhcp3/dhclient.conf.debian by univention-config' found `local diversion of /etc/dhcp3/dhclient.conf to /etc/dhcp3/dhclient.conf.debian' dpkg-divert: error: mismatch on package when removing `diversion of /etc/udev/rules.d/99-uvmm-node-kvm.rules to /etc/udev/rules.d/99-uvmm-node-kvm.rules.debian by univention-config' found `local diversion of /etc/udev/rules.d/99-uvmm-node-kvm.rules to /etc/udev/rules.d/99-uvmm-node-kvm.rules.debian' dpkg-divert: error: mismatch on package when removing `diversion of /etc/modprobe.d/nfs-kernel-lockd to /etc/modprobe.d/nfs-kernel-lockd.debian by univention-config' found `local diversion of /etc/modprobe.d/nfs-kernel-lockd to /etc/modprobe.d/nfs-kernel-lockd.debian' dpkg-divert: error: mismatch on package when removing `diversion of /etc/default/libvirt-bin to /etc/default/libvirt-bin.debian by univention-config' found `local diversion of /etc/default/libvirt-bin to /etc/default/libvirt-bin.debian' dpkg-divert: error: mismatch on package when removing `diversion of /etc/libvirt/qemu.conf to /etc/libvirt/qemu.conf.debian by univention-config' found `local diversion of /etc/libvirt/qemu.conf to /etc/libvirt/qemu.conf.debian' Ursache dafür ist, das in ucs-3.1/ucs/base/univention-config-registry/python/univention/config_registry/handler.py#ConfigHandlerDiverting beim Aufruf von dpkg-divert zwar DPKG_MAINTSCRIPT_PACKAGE=univention-config gesetzt wird (um den Wrapper für dpkg-divert beum Update von 2.4 auf 3.0 zu deaktivieren), aber dabei kein "--local" übergeben wird. "man 1 dpkg-divert" sagt dazu: > ENVIRONMENT > DPKG_MAINTSCRIPT_PACKAGE > If set and the --local and --package options have not been specified, dpkg-divert will use it as the package name. Um das zu verhindern sollten wir unbedingt dort '--local' einfügen. Betroffenen Systemen können wie folgt identifiziert werden: # grep ^univention-config /var/lib/dpkg/diversions Mir ist allerdings noch unklar, warum das Problem nicht immer auftritt. Ggf. sollte ucr auch so modifiert werden, daß die Fehler nicht nach /dev/null umgeleitet werden.
Created attachment 4709 [details] Add --local to dpkg-divert for newer dpkg Das scheint erst mit dpkg_1.16.1.2.89.201203201341 so zu sein (wie auch immer das auf mein Test-System gekommen ist). Von daher ist die Änderung nicht sofort nötig, sollte aber dennoch dringend umgesetzt werden.
dpkg war aus ucs_3.0-0-experimental
Das wird für UCC relevant, von daher sollten wir das noch in 3.1 beheben.
--local wurde beim Aufruf von dpkg-divert ergänzt svn36555, univention-config_8.0.4-9.412.201210231803 ChangeLog: svn15360 \item \ucsUCR{} now always uses local diversion (\ucsBug{28750}).
(In reply to comment #4) > --local wurde beim Aufruf von dpkg-divert ergänzt → --local wird jetzt immer an dpkg-divert übergeben → OK > svn36555, univention-config_8.0.4-9.412.201210231803 > ChangeLog: svn15360 > \item \ucsUCR{} now always uses local diversion (\ucsBug{28750}). → OK
UCS 3.1-0 has been released: http://forum.univention.de/viewtopic.php?f=54&t=2125 If this error occurs again, please use "Clone This Bug".