For example, if you do a quickpkg, remove the lxml dependency in the ebuild, rebuild, do a quickpkg again - you will see bit identical results. (Well, timestamps and counters in the metadata archive will vary). The project history suggests building documentation itself has been optional since like version systemd-42. The sources of the docs are indeed in XML, but they are processed with /usr/bin/xsltproc from dev-libs/libxslt. Someone who knows the byzantine build system better can/should chime in, but near as I can figure, the "man page indices" the installation instructions refer to are HTML indices into the man system that the ebuild does not even install. So, at the very least we should guard the lxml dependency behind some html use/local use flag, but I actually think it can probably be dropped entirely without issue. I only discovered this upon recent version churn of both lxml and cython which removing this as a hard dependency would have simply side-stepped.
Yeah, lxml is only needed to build two man pages: systemd.directives.7 systemd.index.7 I think we could drop it.
It's possible that I'm disabling more than most { emerge --info tail: sys-apps/systemd-utils-256.13 was built with the following: USE="acl kmod tmpfiles udev -boot -kernel-install -secureboot (-selinux) (-split-usr) -sysusers -test -ukify" PYTHON_SINGLE_TARGET="python3_13 -python3_11 -python3_12" }, but neither of those mentioned artifacts (*.directives *.index) show up in my builds for systemd-utils-256.13 with or without lxml installed. Which might explain the bit identicality of dropping/including lxml (although I'm sure there are many ways to investigate). The NEWS file (back in the "CHANGES WITH 243") mentions systemd.index, but only for HTML variants of man pages on a line containing "build/man/html systemd.index". FWIW, I think the docs / comments are unclear in multiple places in how they refer to the HTML formatted version of man pages and more ordinary Unix man pages. Also of note, for some people, lxml might well also be the only reason they have to have Cython installed. So the "transitive dep weight" of this is at least 2.