From: Jörg Behrmann Date: Wed, 20 Aug 2025 13:47:28 +0000 (+0200) Subject: tools: ignore root element explicitly in check-version-history X-Git-Tag: v257.9~21 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b32b5acd13504fdfd88919fc9edd37e1b3de8352;p=thirdparty%2Fsystemd.git tools: ignore root element explicitly in check-version-history 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) --- diff --git a/tools/check-version-history.py b/tools/check-version-history.py index efd7023762e..aa5ea37a255 100644 --- a/tools/check-version-history.py +++ b/tools/check-version-history.py @@ -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]