Univention Bugzilla – Bug 43411
univention-check-templates is broken
Last modified: 2017-04-04 18:29:32 CEST
univention-check-templates uses the parser from debian.deb822.Deb822.iter_paragraphs which is broken in UCS 4.2. But the function has an parameter use_apt_pkg=True which uses python-apt for the task and is much much faster as told in the docstring. Therefore it is also more strict. But as '/var/lib/dpkg/status' is written by dpkg/apt itself this should be always valid?! Demonstrating the brokenness: >>> from debian.deb822 import Deb822 >>> list(Deb822.iter_paragraphs(open('/var/lib/dpkg/status', 'r'), ["Conffiles"], use_apt_pkg=False)) [{'Conffiles': u'\n /etc/dbus-1/system.d/org.freedesktop.UDisks.conf ed1fcf897e31049909a921f2b4cfd026\n /etc/avahi/services/udisks.service a0372c812d283ec1973c2461afd64774'}] >>> list(Deb822.iter_paragraphs(open('/var/lib/dpkg/status', 'r').read(), ["Conffiles"], use_apt_pkg=False)) [{'Conffiles': u'\n /etc/dbus-1/system.d/org.freedesktop.UDisks.conf ed1fcf897e31049909a921f2b4cfd026\n /etc/avahi/services/udisks.service a0372c812d283ec1973c2461afd64774'}] >>> list(Deb822.iter_paragraphs(open('/var/lib/dpkg/status', 'r').read().decode('latin-1'), ["Conffiles"], use_apt_pkg=False)) [{'Conffiles': u'\n /etc/dbus-1/system.d/org.freedesktop.UDisks.conf ed1fcf897e31049909a921f2b4cfd026\n /etc/avahi/services/udisks.service a0372c812d283ec1973c2461afd64774'}] >>> list(Deb822.iter_paragraphs(open('/var/lib/dpkg/status', 'r').read().decode('utf-8'), ["Conffiles"], use_apt_pkg=False)) [{'Conffiles': u'\n /etc/dbus-1/system.d/org.freedesktop.UDisks.conf ed1fcf897e31049909a921f2b4cfd026\n /etc/avahi/services/udisks.service a0372c812d283ec1973c2461afd64774'}] >>> list(Deb822.iter_paragraphs(open('/var/lib/dpkg/status', 'r').read().splitlines(), ["Conffiles"], use_apt_pkg=False)) [{'Conffiles': u'\n /etc/dbus-1/system.d/org.freedesktop.UDisks.conf ed1fcf897e31049909a921f2b4cfd026\n /etc/avahi/services/udisks.service a0372c812d283ec1973c2461afd64774'}]
univention-config-registry (12.0.1-1): r76060 | Bug #43411: fix univention-check-templates
UCS 4.2 has been released: https://docs.software-univention.de/release-notes-4.2-0-en.html https://docs.software-univention.de/release-notes-4.2-0-de.html If this error occurs again, please use "Clone This Bug".