]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commit
devtool: reset: Escape command line input used in regular expression
authorPeter Kjellerstedt <pkj@axis.com>
Tue, 18 Mar 2025 23:25:39 +0000 (00:25 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 20 Mar 2025 11:29:00 +0000 (11:29 +0000)
commit6e73bd9b3e6d529752db93879f2c0ed53873dd1a
tree9e9b551f04044b7b16aa9b99efa3f2f743914c00
parenta59fa4a4bf08bbbd79fbb1642b3e3b23181f87c9
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.

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>
meta-selftest/recipes-test/devtool/devtool-test-reset-re++.bb [new file with mode: 0644]
meta-selftest/recipes-test/devtool/devtool-test-reset-re++/file1 [new file with mode: 0644]
meta/lib/oeqa/selftest/cases/devtool.py
scripts/lib/devtool/standard.py