diff options
author | Peter Kjellerstedt <pkj@axis.com> | 2025-03-19 00:25:39 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-03-20 11:29:04 +0000 |
commit | c0f3bc79b3e5d5b13c950cadfe558bbcd10187a0 (patch) | |
tree | 68323a91fb924088b144fd9d16c539a3b38c18ea /meta-selftest | |
parent | 0e32e1cb260aac59cabbbeba26f8f844978a75a0 (diff) | |
download | poky-c0f3bc79b3e5d5b13c950cadfe558bbcd10187a0.tar.gz |
devtool: reset: Escape command line input used in regular expression
Running, e.g., `devtool reset sdbus-c++` would result in the following
error:
re.error: multiple repeat at position 35
This was due to the ++ in the recipe name, which would be treated as an
incorrect regular expression in _reset().
Use re.escape() to make sure all characters in the recipe name are
treated literally.
(From OE-Core rev: 6e73bd9b3e6d529752db93879f2c0ed53873dd1a)
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta-selftest')
-rw-r--r-- | meta-selftest/recipes-test/devtool/devtool-test-reset-re++.bb | 9 | ||||
-rw-r--r-- | meta-selftest/recipes-test/devtool/devtool-test-reset-re++/file1 | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/meta-selftest/recipes-test/devtool/devtool-test-reset-re++.bb b/meta-selftest/recipes-test/devtool/devtool-test-reset-re++.bb new file mode 100644 index 0000000000..35672a5265 --- /dev/null +++ b/meta-selftest/recipes-test/devtool/devtool-test-reset-re++.bb | |||
@@ -0,0 +1,9 @@ | |||
1 | LICENSE = "CLOSED" | ||
2 | INHIBIT_DEFAULT_DEPS = "1" | ||
3 | |||
4 | SRC_URI = "file://file1" | ||
5 | |||
6 | S = "${WORKDIR}/sources" | ||
7 | UNPACKDIR = "${S}" | ||
8 | |||
9 | EXCLUDE_FROM_WORLD = "1" | ||
diff --git a/meta-selftest/recipes-test/devtool/devtool-test-reset-re++/file1 b/meta-selftest/recipes-test/devtool/devtool-test-reset-re++/file1 new file mode 100644 index 0000000000..51f466f2e4 --- /dev/null +++ b/meta-selftest/recipes-test/devtool/devtool-test-reset-re++/file1 | |||
@@ -0,0 +1 @@ | |||
A file | |||