After I upgraded grub from 2.12-9 to 2.14-1 and removed the resulting
grub-common dummy package, which gave the warning
dpkg: warning: while removing grub-common, directory '/usr/share/doc/grub-common' not empty so not removed
I now have
lrwxrwxrwx 1 root root 11 2015-09-06 03:13:12 /usr/share/doc/grub2-common -> grub-common/
where grub-common contains the files, but this breaks "dpkg -S":
cventin:~> dpkg -S /usr/share/doc/grub-common
dpkg-query: no path found matching pattern /usr/share/doc/grub-common
grub2-common 2.12-9 had the above symlink:
lrwxrwxrwx root/root 0 2025-07-03 18:35:51 ./usr/share/doc/grub2-common -> grub-common
but grub2-common 2.14-1 has
drwxr-xr-x root/root 0 2026-02-05 11:50:50 ./usr/share/doc/
drwxr-xr-x root/root 0 2026-02-05 11:50:50 ./usr/share/doc/grub2-common/
-rw-r--r-- root/root 669 2018-11-24 18:13:02 ./usr/share/doc/grub2-common/AUTHORS
-rw-r--r-- root/root 242 2026-02-05 11:50:50 ./usr/share/doc/grub2-common/NEWS.Debian.gz
-rw-r--r-- root/root 9594 2026-01-14 16:46:20 ./usr/share/doc/grub2-common/NEWS.gz
-rw-r--r-- root/root 1043 2021-06-08 14:15:20 ./usr/share/doc/grub2-common/README
-rw-r--r-- root/root 1398 2018-11-24 18:13:02 ./usr/share/doc/grub2-common/THANKS
-rw-r--r-- root/root 318 2018-11-24 18:13:02 ./usr/share/doc/grub2-common/TODO
-rw-r--r-- root/root 16905 2026-02-05 11:50:50 ./usr/share/doc/grub2-common/changelog.Debian.gz
-rw-r--r-- root/root 376801 2026-01-14 19:46:54 ./usr/share/doc/grub2-common/changelog.gz
-rw-r--r-- root/root 22963 2026-02-05 11:50:50 ./usr/share/doc/grub2-common/copyright
drwxr-xr-x root/root 0 2026-02-05 11:50:50 ./usr/share/doc/grub2-common/examples/
-rw-r--r-- root/root 1705 2018-11-24 18:13:02 ./usr/share/doc/grub2-common/examples/grub.cfg
So something bad occurred during the upgrade. I suppose that the
symlink /usr/share/doc/grub2-common should have been dropped first,
so that the above files could have been installed directly in a
real directory "/usr/share/doc/grub2-common".