Patchwork [04/20] package_rpm.bbclass:Make the regexp less greedy

login
register
mail settings
Submitter Khem Raj
Date Aug. 27, 2013, 5:15 p.m.
Message ID <621ba27fe578346e2feae489fba4d576148299fc.1377623208.git.raj.khem@gmail.com>
Download mbox | patch
Permalink /patch/56731/
State New
Headers show

Comments

Khem Raj - Aug. 27, 2013, 5:15 p.m.
This causes issues when postinstalls have ERROR keywords
its interpreted as error and image build is cancelled

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/classes/package_rpm.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Phil Blundell - Aug. 27, 2013, 6:47 p.m.
On Tue, 2013-08-27 at 10:15 -0700, Khem Raj wrote:
> This causes issues when postinstalls have ERROR keywords
> its interpreted as error and image build is cancelled
> 
> Signed-off-by: Khem Raj <raj.khem@gmail.com>

As I mentioned before, "the regexp" isn't a very satisfactory
description of the locus for this change, given that the file contains
many regexps.  I'm also not entirely convinced that this patch really
makes the regexp "less greedy" in any meaningful way: it makes it less
prone to unintended matches, but that's a different issue to greediness.

p.
Khem Raj - Aug. 28, 2013, 6:15 a.m.
On Aug 27, 2013, at 11:47 AM, Phil Blundell <pb@pbcl.net> wrote:

> On Tue, 2013-08-27 at 10:15 -0700, Khem Raj wrote:
>> This causes issues when postinstalls have ERROR keywords
>> its interpreted as error and image build is cancelled
>> 
>> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> 
> As I mentioned before, "the regexp" isn't a very satisfactory
> description of the locus for this change, given that the file contains
> many regexps.  I'm also not entirely convinced that this patch really
> makes the regexp "less greedy" in any meaningful way: it makes it less
> prone to unintended matches, but that's a different issue to greediness.
> 

Thanks Phil, I have reworded it to make it more clearer hopefully. The commit it pushed to the pull branch here

http://git.openembedded.org/openembedded-core-contrib/commit/?h=kraj/python3&id=5ddf816178a72b685039ce5b1ab161c5c751ad5e

> p.
> 
>

Patch

diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index b29d3ed..a9ec9b2 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -60,7 +60,7 @@  rpm_log_check() {
 	lf_txt="`cat $lf_path`"
 	for keyword_die in "unpacking of archive failed" "Cannot find package" "exit 1" ERR Fail
 	do
-		if (echo "$lf_txt" | grep -v log_check | grep "$keyword_die") >/dev/null 2>&1
+		if (echo "$lf_txt" | grep -v log_check | grep "\<$keyword_die\>") >/dev/null 2>&1
 		then
 			echo "log_check: There were error messages in the logfile"
 			printf "log_check: Matched keyword: [$keyword_die]\n\n"