Skip to contentSkip to conversation

package_ipk: Remove spurious '-i' in grep command for log_check

PATCH Applied Phil Blundell 2 participants 2 messages Sep 26, 2012 – Sep 27, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package_ipk: Remove spurious '-i' in grep command for log_check

ipk_log_check uses a case-sensitive grep (which is correct) when deciding whether there were any errors or not. But if it decides that there were, it then uses a case-insensitive grep to display them. This results in a large amount of irrelevant and confusing output which makes it hard to see the real errors amongst the noise.

Suppress this by removing the unwanted -i.

---
 meta/classes/package_ipk.bbclass |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/package_ipk.bbclass +1 -1
index efe299e..59cb856 100644
@@ -182,7 +182,7 @@ ipk_log_check() {
 		then
 			echo "log_check: There were error messages in the logfile"
 			printf "log_check: Matched keyword: [$keyword_die]\n\n"
-			echo "$lf_txt" | grep -v log_check | grep -C 5 -i "$keyword_die"
+			echo "$lf_txt" | grep -v log_check | grep -C 5 "$keyword_die"
 			echo ""
 			do_exit=1
 		fi
Signature · 1 line
1.7.10.4
Applied
#1 lore raw
Quoted 19 lines · Phil Blundell

ipk_log_check uses a case-sensitive grep (which is correct) when deciding whether there were any errors or not. But if it decides that there were, it then uses a case-insensitive grep to display them. This results in a large amount of irrelevant and confusing output which makes it hard to see the real errors amongst the noise.

Suppress this by removing the unwanted -i.

---
  meta/classes/package_ipk.bbclass |    2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/package_ipk.bbclass +0 -0
index efe299e..59cb856 100644

meta/classes/package_ipk.bbclass ipk_log_check() { · line 188

Quoted 8 lines
meta/classes/package_ipk.bbclass +1 -1
@@ -182,7 +182,7 @@ ipk_log_check() {
  		then
  			echo "log_check: There were error messages in the logfile"
  			printf "log_check: Matched keyword: [$keyword_die]\n\n"
-			echo "$lf_txt" | grep -v log_check | grep -C 5 -i "$keyword_die"
+			echo "$lf_txt" | grep -v log_check | grep -C 5 "$keyword_die"
  			echo ""
  			do_exit=1
  		fi

Merged into OE-Core

Thanks
Sau!