From: Joshua Watt <jpewhacker@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: Re: [morty][PATCH] archiver: Escape recipe name in regex
Date: Tue, 27 Jun 2017 11:08:08 -0500 [thread overview]
Message-ID: <1498579688.11937.3.camel@gmail.com> (raw)
In-Reply-To: <20170606023049.6415-1-JPEWhacker@gmail.com>
On Mon, 2017-06-05 at 21:30 -0500, Joshua Watt wrote:
> From: Joshua Watt <jpewhacker@gmail.com>
>
> 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>
> ---
> 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 3543ca9..188f8c0 100644
> --- a/meta/classes/archiver.bbclass
> +++ b/meta/classes/archiver.bbclass
> @@ -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)
Ping?
prev parent reply other threads:[~2017-06-27 16:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-06 2:30 [morty][PATCH] archiver: Escape recipe name in regex Joshua Watt
2017-06-27 16:08 ` Joshua Watt [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1498579688.11937.3.camel@gmail.com \
--to=jpewhacker@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox