mirror of
https://git.yoctoproject.org/poky
synced 2026-03-19 13:49:41 +01:00
archiver: Escape recipe name in regex
The recipe name needs to be escaped when using it in a regular expression so that and special characters are treated literally (From OE-Core rev: a26d12e43059fe37c843d3ff9480ead2e796e21f) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
81f8a454d0
commit
5e4adbd780
@@ -349,8 +349,8 @@ python do_ar_recipe () {
|
||||
bbappend_files = d.getVar('BBINCLUDED', True).split()
|
||||
# If recipe name is aa, we need to match files like aa.bbappend and aa_1.1.bbappend
|
||||
# Files like aa1.bbappend or aa1_1.1.bbappend must be excluded.
|
||||
bbappend_re = re.compile( r".*/%s_[^/]*\.bbappend$" %pn)
|
||||
bbappend_re1 = re.compile( r".*/%s\.bbappend$" %pn)
|
||||
bbappend_re = re.compile( r".*/%s_[^/]*\.bbappend$" % re.escape(pn))
|
||||
bbappend_re1 = re.compile( r".*/%s\.bbappend$" % re.escape(pn))
|
||||
for file in bbappend_files:
|
||||
if bbappend_re.match(file) or bbappend_re1.match(file):
|
||||
shutil.copy(file, outdir)
|
||||
|
||||
Reference in New Issue
Block a user