]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tools: ignore root element explicitly in check-version-history
authorJörg Behrmann <behrmann@physik.fu-berlin.de>
Wed, 20 Aug 2025 13:47:28 +0000 (15:47 +0200)
committerJörg Behrmann <behrmann@physik.fu-berlin.de>
Mon, 25 Aug 2025 12:38:00 +0000 (14:38 +0200)
Currently these messages (broken for length)

    2025-08-20T12:04:15.9609277Z
    /home/runner/work/systemd/systemd/tools/check-version-history.py:26:
    FutureWarning: This search incorrectly ignores the root element, and will be fixed in a future version.
    If you rely on the current behaviour, change it to './/funcprototype/funcdef/function'

can be seen in CI output. So let's apply the suggestion.

tools/check-version-history.py

index dce2b6abd16d4cd6156634f1cb8d31b1cd21a86f..db32b6920ab52261007fc813d64eb41e32f70ede 100755 (executable)
@@ -23,7 +23,7 @@ def find_undocumented_functions(pages, ignorelist):
         assert pagetree.getroot().tag == "refentry"
 
         hist_section = pagetree.find("refsect1[title='History']")
-        for func in pagetree.findall("//funcprototype/funcdef/function"):
+        for func in pagetree.findall(".//funcprototype/funcdef/function"):
             path = f"./refsynopsisdiv/funcsynopsis/funcprototype/funcdef/function[.='{func.text}']"
             assert pagetree.findall(path) == [func]