From patchwork Fri Aug 4 16:26:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 109428 Delivered-To: patch@linaro.org Received: by 10.182.109.195 with SMTP id hu3csp1577273obb; Fri, 4 Aug 2017 09:27:06 -0700 (PDT) X-Received: by 10.84.216.71 with SMTP id f7mr3452554plj.150.1501864026731; Fri, 04 Aug 2017 09:27:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1501864026; cv=none; d=google.com; s=arc-20160816; b=w7ThUnP1P7FWj+cX0BSZL4CMOCbWngN2gps3b4iTj3YIvFGjJHeW6bsZsq+Uzw75qe FKw75fyhyf+D5ZZIO3OwBx21HDAhc+XHk3xKBH+/Y2NT+V0Kfg1QpCL9v3pAsOaLCY+x KA1A2PiZDjY7jNjmfLDTEU8xthJ4Jw/4G+OrkEkCuh7dvw3oxkjqBunH4rv+LCCtNvDP HQY3sW/5ZngKSasZE2m++Aap74y29XCLVRGD828IXfj3IerUBYrBxNr4gjQ0WQ3deKaO mXvoZeO9EKakQDLv5t7yydZslqD391miB4ijUqbfdFsr1y1da7AkRB/3UT3SLjE5BJTX LgQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :delivered-to:arc-authentication-results; bh=9fYiC5Dmk7HgyO2sN+yPc9f60emplQu1OowQiSWKUow=; b=QbS8mb/SHatq6RayxGUm5ojDYJPVU1OiBrE51iG4FRq6JY2hjA/hZuXj6EwcUiyvig Nm/wV5I2B21G9bifF5kqnkDuekih7ncHsczChU701wmLfUQY4rD87ssYd53CERAnHOzB 0k4d2sgitUd7D9AgDXS13DxWdiAEUKceG73vWusM7OIeeCB6CAals2WnaTXpgcQIeKXz JUAuFY+qNwrqk+uJZZvTMXUbtt1K6wmht3l2fw1Jw17oO+OjrSXN3RgQDD3hIkxzMZY5 P7AA6g2LDzSdbUm/pTdeUg2VaAOPZuIEpDWSeGn7r/J0Kzi3yQ90XUB7vSdu6kYLt1Wj Q0Ng== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel-com.20150623.gappssmtp.com header.b=k6XWVNod; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id s13si1385632plj.719.2017.08.04.09.27.06; Fri, 04 Aug 2017 09:27:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel-com.20150623.gappssmtp.com header.b=k6XWVNod; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org Received: from review.yoctoproject.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id B26E771B86; Fri, 4 Aug 2017 16:27:03 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-wm0-f53.google.com (mail-wm0-f53.google.com [74.125.82.53]) by mail.openembedded.org (Postfix) with ESMTP id 73CD3600B3 for ; Fri, 4 Aug 2017 16:27:02 +0000 (UTC) Received: by mail-wm0-f53.google.com with SMTP id m85so24038074wma.1 for ; Fri, 04 Aug 2017 09:27:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=KqyN75i8e7DdKTaKUhM+IIhUqoqC09ZgkxN8Z3ALGjI=; b=k6XWVNoddlRIwXMiz3tUC6Y62fhETyRG3HGquxvOhFHgKjG/KmhXLLY+1tf182uAF7 Wz23d1nV17HdIVtTFJZkRxXPKyXCS25mGZE/1DTMDZhIQwnTZYrU7GFP3XoFryHeB094 O1ARXjTgOizXRi1ucnTnS/OM9sGa6ILQBolBKIjim8ov0GLT3dLTUF4aP76TPygCkJjL C8khs49vxs4Jjq68dVSJer5A/rg4uCBLR0E7imHVuVzFjlgXoKzf1etn74Ao7fP+QsAg 0I8s7X0C+A1n+yYhFGl6jv3gqO632MxySbLtuTtJZjOe41nRawJKqh7EOGaskctNUrvl ggxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=KqyN75i8e7DdKTaKUhM+IIhUqoqC09ZgkxN8Z3ALGjI=; b=Vgg+ABpBDkhDwI2P38PVdD3+mRZklkL6J+crK77PrHXvgNPwBH+UTl2kEttgo7m1OW Q95cyPrCbEvGM3gz6fnvvUMu/qlJDIiXQ0velUsID8Lvb1cXnlbHvVXl/u8l/155rD7v YU2toF9geMqxasZxCh+h/Bb9jc6L5P7w2k8NW0Wxkwj8weRZWv4iGRnFOLQqCDmyfP75 ayNyC1ZjNyWDoa203yUA8h854egQXLCRTjjpeBeALPImpAVmF6chd/tj9mFhLWgo18Oz 2JqJ+bXeS839ZGT27uIaufJT1/tDwKHS4HwhzoBiDrUlC9C9hlLlFJQ4W0gyj2UfAU34 xlEA== X-Gm-Message-State: AHYfb5g3cgLyD1936hq6yhg/QGi0tngzs/Ukye3a1kFI7BwoDsZkCeaF AJHgxVKUnOcBagGBOYc= X-Received: by 10.28.13.138 with SMTP id 132mr2071898wmn.23.1501864022860; Fri, 04 Aug 2017 09:27:02 -0700 (PDT) Received: from flashheart.burtonini.com (home.burtonini.com. [81.2.106.35]) by smtp.gmail.com with ESMTPSA id f80sm1275946wmh.16.2017.08.04.09.27.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 04 Aug 2017 09:27:02 -0700 (PDT) From: Ross Burton To: openembedded-core@lists.openembedded.org Date: Fri, 4 Aug 2017 17:26:58 +0100 Message-Id: <20170804162700.11765-1-ross.burton@intel.com> X-Mailer: git-send-email 2.11.0 Subject: [OE-core] [PATCH][morty 1/3] archiver: Escape recipe name in regex X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org From: Joshua Watt 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 Signed-off-by: Ross Burton --- meta/classes/archiver.bbclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.11.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/classes/archiver.bbclass b/meta/classes/archiver.bbclass index 3543ca9c588..188f8c04232 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)