Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 955447 - sys-apps/systemd-utils does not actually need dev-python/lxml
Summary: sys-apps/systemd-utils does not actually need dev-python/lxml
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo systemd Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-05-05 10:03 UTC by C.Blake
Modified: 2025-05-05 16:35 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description C.Blake 2025-05-05 10:03:19 UTC
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.
Comment 1 Mike Gilbert gentoo-dev 2025-05-05 15:31:01 UTC
Yeah, lxml is only needed to build two man pages:

systemd.directives.7
systemd.index.7

I think we could drop it.
Comment 2 C.Blake 2025-05-05 16:35:28 UTC
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.