Skip to contentSkip to conversation

rootfs_ipk: don't echo opkg-cl output to log.do_rootfs

PATCH Superseded Martin Jansa 4 participants 6 messages Mar 30, 2012 – Apr 3, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rootfs_ipk: don't echo opkg-cl output to log.do_rootfs

* log_check can find some files with ERR or Fail substring e.g. in "Source: " field

---
 meta/classes/rootfs_ipk.bbclass |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
meta/classes/rootfs_ipk.bbclass +2 -0
index 13bd4bf..8685fa3 100644
@@ -128,9 +128,11 @@ list_installed_packages() {
 
 get_package_filename() {
 	info=`opkg-cl ${IPKG_ARGS} info $1 | grep -B 7 -A 7 "^Status.* \(\(installed\)\|\(unpacked\)\)" || true`
+	set +x
 	name=`echo "${info}" | awk '/^Package/ {printf $2"_"}'`
 	name=$name`echo "${info}" | awk -F: '/^Version/ {printf $NF"_"}' | sed 's/^\s*//g'`
 	name=$name`echo "${info}" | awk '/^Archi/ {print $2".ipk"}'`
+	set -x
 
 	fullname=`find ${DEPLOY_DIR_IPK} -name "$name" || true`
 	if [ "$fullname" = "" ] ; then
Signature · 1 line
1.7.8.5
#1 lore raw
Quoted 12 lines · Martin Jansa

* log_check can find some files with ERR or Fail substring e.g. in "Source: " field

---
 meta/classes/rootfs_ipk.bbclass |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
meta/classes/rootfs_ipk.bbclass +0 -0
index 13bd4bf..8685fa3 100644

meta/classes/rootfs_ipk.bbclass list_installed_packages() { · line 131

Quoted 4 lines
meta/classes/rootfs_ipk.bbclass +1 -0
@@ -128,9 +128,11 @@ list_installed_packages() {
 
 get_package_filename() {
 	info=`opkg-cl ${IPKG_ARGS} info $1 | grep -B 7 -A 7 "^Status.* \(\(installed\)\|\(unpacked\)\)" || true`
+	set +x

This needs to be before opkg-cl call as set -x prints info assignment too.

Will resend v2 after someone confirms it's fine now (I don't have test case for this here).

Quoted 10 lines
meta/classes/rootfs_ipk.bbclass +1 -0
 	name=`echo "${info}" | awk '/^Package/ {printf $2"_"}'`
 	name=$name`echo "${info}" | awk -F: '/^Version/ {printf $NF"_"}' | sed 's/^\s*//g'`
 	name=$name`echo "${info}" | awk '/^Archi/ {print $2".ipk"}'`
+	set -x
 
 	fullname=`find ${DEPLOY_DIR_IPK} -name "$name" || true`
 	if [ "$fullname" = "" ] ; then
Signature · 1 line
1.7.8.5
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#2 lore raw

PATCH v2 1/1 rootfs_ipk: don't echo opkg-cl output to log.do_rootfs

In reply to Martin Jansa

* log_check can find some files with ERR or Fail substring e.g. in "Source: " field

---
 meta/classes/rootfs_ipk.bbclass |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
meta/classes/rootfs_ipk.bbclass +2 -0
index 13bd4bf..cbc63f0 100644
@@ -127,10 +127,12 @@ list_installed_packages() {
 }
 
 get_package_filename() {
+	set +x
 	info=`opkg-cl ${IPKG_ARGS} info $1 | grep -B 7 -A 7 "^Status.* \(\(installed\)\|\(unpacked\)\)" || true`
 	name=`echo "${info}" | awk '/^Package/ {printf $2"_"}'`
 	name=$name`echo "${info}" | awk -F: '/^Version/ {printf $NF"_"}' | sed 's/^\s*//g'`
 	name=$name`echo "${info}" | awk '/^Archi/ {print $2".ipk"}'`
+	set -x
 
 	fullname=`find ${DEPLOY_DIR_IPK} -name "$name" || true`
 	if [ "$fullname" = "" ] ; then
Signature · 1 line
1.7.8.5
Acked-by on v2 1/1
#3 lore raw
Quoted 3 lines · Martin Jansa

* log_check can find some files with ERR or Fail substring e.g. in "Source: " field

This one looks better and it does not change the regex string, like the patch sent to bitbake-devel...

Quoted 29 lines
---
 meta/classes/rootfs_ipk.bbclass |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
meta/classes/rootfs_ipk.bbclass +2 -0
index 13bd4bf..cbc63f0 100644
@@ -127,10 +127,12 @@ list_installed_packages() {
 }
 
 get_package_filename() {
+	set +x
 	info=`opkg-cl ${IPKG_ARGS} info $1 | grep -B 7 -A 7 "^Status.* \(\(installed\)\|\(unpacked\)\)" || true`
 	name=`echo "${info}" | awk '/^Package/ {printf $2"_"}'`
 	name=$name`echo "${info}" | awk -F: '/^Version/ {printf $NF"_"}' | sed 's/^\s*//g'`
 	name=$name`echo "${info}" | awk '/^Archi/ {print $2".ipk"}'`
+	set -x
 
 	fullname=`find ${DEPLOY_DIR_IPK} -name "$name" || true`
 	if [ "$fullname" = "" ] ; then
Signature · 7 lines
1.7.8.5


_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Applied
#5 lore raw
In reply to Martin Jansa
Quoted 14 lines · Martin Jansa

* log_check can find some files with ERR or Fail substring e.g. in "Source: " field

---
  meta/classes/rootfs_ipk.bbclass |    2 ++
  1 files changed, 2 insertions(+), 0 deletions(-)
meta/classes/rootfs_ipk.bbclass +0 -0
index 13bd4bf..cbc63f0 100644
@@ -127,10 +127,12 @@ list_installed_packages() {
  }
 

meta/classes/rootfs_ipk.bbclass list_installed_packages() { · line 138

Quoted 10 lines
meta/classes/rootfs_ipk.bbclass +2 -0
  get_package_filename() {
+	set +x
  	info=`opkg-cl ${IPKG_ARGS} info $1 | grep -B 7 -A 7 "^Status.* \(\(installed\)\|\(unpacked\)\)" || true`
  	name=`echo "${info}" | awk '/^Package/ {printf $2"_"}'`
  	name=$name`echo "${info}" | awk -F: '/^Version/ {printf $NF"_"}' | sed 's/^\s*//g'`
  	name=$name`echo "${info}" | awk '/^Archi/ {print $2".ipk"}'`
+	set -x
 
  	fullname=`find ${DEPLOY_DIR_IPK} -name "$name" || true`
  	if [ "$fullname" = "" ] ; then

Merged into OE-Core

Thanks
Sau!