diff options
author | Gyorgy Sarvari <skandigraun@gmail.com> | 2025-09-15 11:02:07 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-09-18 11:16:35 +0100 |
commit | c0e65493c328d92eda897eed43b75a1b9d46d728 (patch) | |
tree | 5d1ab4b974c240ddad3d0b6ad32bb9d2edf6f074 | |
parent | 6254619b7f12e44ed27f2c98a3b08af886f60e10 (diff) | |
download | poky-c0e65493c328d92eda897eed43b75a1b9d46d728.tar.gz |
patchtest: ignore patch file metadata from SRC_URI
The test_src_uri_left_files check prepares a list of patchfiles SRC_URI from
before and after the patch is applied, looking for dangling patches.
The name of the files in this list can be incorrect, in case the URI contains
some extra metadata (like patchdir), because os.path.basename will use the last portion
of the line being processed, which is independent from the files in question.
To avoid this, try to use only the first portion of URI, before any extra metadata.
(From OE-Core rev: 7c0febd01e39c6d6a8b7821adcda5f397d597bee)
Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/lib/patchtest/tests/test_metadata.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/lib/patchtest/tests/test_metadata.py b/meta/lib/patchtest/tests/test_metadata.py index 63d01819e7..30da8dbe60 100644 --- a/meta/lib/patchtest/tests/test_metadata.py +++ b/meta/lib/patchtest/tests/test_metadata.py | |||
@@ -150,8 +150,8 @@ class TestMetadata(base.Metadata): | |||
150 | "%s-%s-%s" % (self.shortid(), patchtest_patterns.metadata_src_uri, pn) | 150 | "%s-%s-%s" % (self.shortid(), patchtest_patterns.metadata_src_uri, pn) |
151 | ].split() | 151 | ].split() |
152 | 152 | ||
153 | pretest_files = set([os.path.basename(patch) for patch in pretest_src_uri if patch.startswith('file://')]) | 153 | pretest_files = set([os.path.basename(patch.split(';')[0]) for patch in pretest_src_uri if patch.startswith('file://')]) |
154 | test_files = set([os.path.basename(patch) for patch in test_src_uri if patch.startswith('file://')]) | 154 | test_files = set([os.path.basename(patch.split(';')[0]) for patch in test_src_uri if patch.startswith('file://')]) |
155 | 155 | ||
156 | # check if files were removed | 156 | # check if files were removed |
157 | if len(test_files) < len(pretest_files): | 157 | if len(test_files) < len(pretest_files): |