summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorJoshua Watt <jpewhacker@gmail.com>2017-08-04 17:26:58 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-08-29 16:50:54 +0100
commit5e4adbd78003bec7b0fd2295c27b7ac75ab326ed (patch)
tree0efeb0bc3034f798e7b789ffa2ce3ce42c2c634f /meta
parent81f8a454d0fe1ccf1042cbe6d53b4ecf52c5c22d (diff)
downloadpoky-5e4adbd78003bec7b0fd2295c27b7ac75ab326ed.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: 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>
Diffstat (limited to 'meta')
-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 3543ca9c58..188f8c0423 100644
--- a/meta/classes/archiver.bbclass
+++ b/meta/classes/archiver.bbclass
@@ -349,8 +349,8 @@ python do_ar_recipe () {
349 bbappend_files = d.getVar('BBINCLUDED', True).split() 349 bbappend_files = d.getVar('BBINCLUDED', True).split()
350 # If recipe name is aa, we need to match files like aa.bbappend and aa_1.1.bbappend 350 # If recipe name is aa, we need to match files like aa.bbappend and aa_1.1.bbappend
351 # Files like aa1.bbappend or aa1_1.1.bbappend must be excluded. 351 # Files like aa1.bbappend or aa1_1.1.bbappend must be excluded.
352 bbappend_re = re.compile( r".*/%s_[^/]*\.bbappend$" %pn) 352 bbappend_re = re.compile( r".*/%s_[^/]*\.bbappend$" % re.escape(pn))
353 bbappend_re1 = re.compile( r".*/%s\.bbappend$" %pn) 353 bbappend_re1 = re.compile( r".*/%s\.bbappend$" % re.escape(pn))
354 for file in bbappend_files: 354 for file in bbappend_files:
355 if bbappend_re.match(file) or bbappend_re1.match(file): 355 if bbappend_re.match(file) or bbappend_re1.match(file):
356 shutil.copy(file, outdir) 356 shutil.copy(file, outdir)