diff options
author | Joshua Watt <jpewhacker@gmail.com> | 2017-06-05 21:33:42 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-01-07 17:06:34 +0000 |
commit | ed2d0781d3e991a7e0eb4bf7a04a9e91cd8793be (patch) | |
tree | 24f8f9412ad8f309ff7f162ba9c787191ea35068 /meta | |
parent | 8bf158857d7c597c58efc4023bdd9c2785d43ad3 (diff) | |
download | openembedded-core-contrib-ed2d0781d3e991a7e0eb4bf7a04a9e91cd8793be.tar.gz |
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: 53c8cceb744adda1bf899d62071d11b20a5dea98)
(From OE-Core rev: 5818fa4ddb1473b7d951ccb24f9953a011082312)
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/archiver.bbclass | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass index 2c04557f79..9cc9fb536a 100644 --- a/meta/classes/archiver.bbclass +++ b/meta/classes/archiver.bbclass @@ -349,8 +349,8 @@ python do_ar_recipe () { bbappend_files = d.getVar('BBINCLUDED').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) |