With the login I see the following:
"The current cannot be loaded to give to errors below, please select another theme"
"file://usr/share/sdre/sddm/themes/breeze/Main.qml no such file or directory"
When I try to enter the password and press the Enter, nothing just happens. At least I can switch to a different tty, though
Of the probably relevant logs in /var/log/dpkg.log:
Many logs of this type with appropriate timestamps of the time dpkg was doing it.status installed <package>
status half-installed <package>
status half-configured <package>
status configured <package>
status unpacked <packet>
What can be done to fix it or rollback as it was without making it worse? Never really had to fix anything related to KDE and such a large-scale dpkg mess-up.
Also, I don't think the problem is merely with sddm. I suspect my emacs package installation was merely a catalyzer for a long-standing problem with dependencies due to lack of updates (I've seen suspicious suggestiong by dpkg before as well, like when it suggested to install/upgrade/remove hundreds of packages, including system ones like konsole in order to install some innocent little package).
It does seem that in /var/backups I have some automatic backups like dpkg.status.0 and apt.extended_states.0 from a few days ago, and in /var/log/syslog a few hours before today's disaster there's a log of dpkg.db.backup-service, though I haven't found where it stores these backups yet, and what I can actually restore with them, and whether it can accurately fix my problem or not.
Also, here's the package that kickstarted everything:
https://elpa.nongnu.org/nongnu/pdf-tools.html
...pdf-tools requires a server epdfinfo to run against, which it will try to compile and build when it is activated for the first time.
This rendering is performed by a special library named, for whatever reason, poppler, running inside a server program. This program is called epdfinfo and its job is to successively read requests from Emacs and produce the proper results, i.e. the PNG image of a PDF page.