[oe-commits] [openembedded-core] 02/38: archiver: Escape recipe name in regex
git at git.openembedded.org
git at git.openembedded.org
Sat Jun 3 22:46:54 UTC 2017
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master
in repository openembedded-core.
commit 53c8cceb744adda1bf899d62071d11b20a5dea98
Author: Joshua Watt <jpewhacker at gmail.com>
AuthorDate: Wed May 31 07:42:37 2017 -0500
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
Signed-off-by: Joshua Watt <JPEWhacker at gmail.com>
Signed-off-by: Ross Burton <ross.burton at intel.com>
---
meta/classes/archiver.bbclass | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass
index aa74146..37a21fe 100644
--- a/meta/classes/archiver.bbclass
+++ b/meta/classes/archiver.bbclass
@@ -378,8 +378,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)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list