The port creates some directories under /var/db/dpkg: post-install: (cd ${STAGEDIR}${DPKGDIR} && ${MKDIR} available diversions \ statoverride status) This is incorrect as these all should be files (spied at some ubuntu system) and in fact this breaks dpkg operation. These should either not be touched at all (if dpkg can create them on its own) or some default versions should be installed and handled via @sample.
A commit references this bug: Author: pawel Date: Fri Mar 4 17:04:51 UTC 2016 New revision: 410139 URL: https://svnweb.freebsd.org/changeset/ports/410139 Log: Mistkenly some positions in pkg-plist were created as directories instead of empty files. Fix this and use @sample keyword for they removal management in place of install/deinstall scripts. PR: 207527 Reported by: amdmi3 Changes: head/archivers/dpkg/Makefile head/archivers/dpkg/files/pkg-deinstall.in head/archivers/dpkg/files/pkg-install.in head/archivers/dpkg/pkg-plist