]> 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)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 3 Sep 2025 10:10:48 +0000 (12:10 +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.

(cherry picked from commit 1dcbb0b4ca48fe69e2984943d536c3f4252b12b1)

tools/check-version-history.py

index efd7023762e6008e32247cb9d4d00e639ab256f6..aa5ea37a25556f7dce098653693585b367c6ee67 100644 (file)
@@ -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]