summaryrefslogtreecommitdiffstats
path: root/meta/classes/archiver.bbclass
diff options
context:
space:
mode:
authorJoshua Watt <jpewhacker@gmail.com>2017-05-31 07:42:37 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-06-03 23:46:05 +0100
commit1a4494b2e6953bf30fcb03045874f5ed8bd62c81 (patch)
tree8d2487e9e7e8e280dd165e91d204b2453c15cdc9 /meta/classes/archiver.bbclass
parentcf06129961a39365d4128e1f5d6f01765d6fc8d1 (diff)
downloadpoky-1a4494b2e6953bf30fcb03045874f5ed8bd62c81.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) 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/classes/archiver.bbclass')
-rw-r--r--meta/classes/archiver.bbclass4
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass
index aa741463d7..37a21fe61b 100644
--- a/meta/classes/archiver.bbclass
+++ b/meta/classes/archiver.bbclass
@@ -378,8 +378,8 @@ python do_ar_recipe () {
378 bbappend_files = d.getVar('BBINCLUDED').split() 378 bbappend_files = d.getVar('BBINCLUDED').split()
379 # If recipe name is aa, we need to match files like aa.bbappend and aa_1.1.bbappend 379 # If recipe name is aa, we need to match files like aa.bbappend and aa_1.1.bbappend
380 # Files like aa1.bbappend or aa1_1.1.bbappend must be excluded. 380 # Files like aa1.bbappend or aa1_1.1.bbappend must be excluded.
381 bbappend_re = re.compile( r".*/%s_[^/]*\.bbappend$" %pn) 381 bbappend_re = re.compile( r".*/%s_[^/]*\.bbappend$" % re.escape(pn))
382 bbappend_re1 = re.compile( r".*/%s\.bbappend$" %pn) 382 bbappend_re1 = re.compile( r".*/%s\.bbappend$" % re.escape(pn))
383 for file in bbappend_files: 383 for file in bbappend_files:
384 if bbappend_re.match(file) or bbappend_re1.match(file): 384 if bbappend_re.match(file) or bbappend_re1.match(file):
385 shutil.copy(file, outdir) 385 shutil.copy(file, outdir)