[OE-core] [PATCH 1/1] Create a script for SUMMARY audit in recipes
Shane Wang
shane.wang at intel.com
Wed Dec 21 04:32:50 UTC 2011
Some recipes don't contain SUMMARY, which HOB will use for descriptions.
If the summary is missing, bitbake will create a default value for summary.
That is PN plus string " version " plus its version. Every maintainer should add and update the summary fields according to audit results.
[YOCTO #1804] got fixed, and maintainers should follow up.
Signed-off-by: Shane Wang <shane.wang at intel.com>
---
scripts/contrib/summary-audit.sh | 55 ++++++++++++++++++++++++++++++++++++++
1 files changed, 55 insertions(+), 0 deletions(-)
create mode 100755 scripts/contrib/summary-audit.sh
diff --git a/scripts/contrib/summary-audit.sh b/scripts/contrib/summary-audit.sh
new file mode 100755
index 0000000..63b43cb
--- /dev/null
+++ b/scripts/contrib/summary-audit.sh
@@ -0,0 +1,55 @@
+#!/bin/sh
+#
+# Perform an audit of which recipes provide summary and which
+# are missing for HOB2.
+#
+# Setup requirements: Run this script after source'ing the build
+# environment script, so you're running it from build/ directory.
+#
+# Maintainer: Shane Wang <shane.wang at intel.com>
+
+DISTRO_TRACKING_FILE="../meta/conf/distro/include/distro_tracking_fields.inc"
+REPORT_MISSING_SUMMARY="summary.txt"
+REPORT_LOG="summary.log"
+
+rm -rf $REPORT_MISSING_SUMMARY $REPORT_LOG
+
+BITBAKE=`which bitbake`
+if [ -z "$BITBAKE" ]; then
+ echo "Error: bitbake command not found."
+ echo "Did you forget to source the build environment script?"
+ exit 1
+fi
+
+packages=(`bitbake -s | awk '{ print \$1 }'`)
+versions=(`bitbake -s | awk '{ print \$2 }'`)
+
+echo "Package Num: ${#packages[*]} Version Num: ${#versions[*]}" >> "$REPORT_LOG"
+len=${#packages[*]}
+
+for (( i=0; i < "$len"; i++ )); do
+ pkg=${packages[$i]}
+
+ if [[ "$pkg" == "Loading" || "$pkg" == "Loaded" ||
+ "$pkg" == "Parsing" || "$pkg" == "Package" ||
+ "$pkg" == "NOTE:" || "$pkg" == "WARNING:" ||
+ "$pkg" == "done." || "$pkg" == "============" ||
+ "$pkg" == "ERROR:" || "$pkg" == "Traceback" ||
+ "$pkg" == "File" || "$pkg" == "IndexError:" ]]
+ then
+ # Skip initial bitbake output
+ continue
+ fi
+
+ SUMMARY=`bitbake -e $pkg | grep -e "^SUMMARY *=" | awk -F '=' '{ print \$2 }' | awk -F '"' '{ print \$2 }'`
+ ver=${versions[$i]#*:} # remove ':' in the version
+ echo "Handling package $pkg ($i out of $len) ..."
+ echo "HANDLING SUMMARY of package $pkg ... $SUMMARY <---NOT---> $pkg version $ver" >> "$REPORT_LOG"
+
+ if [[ "$SUMMARY" =~ "$pkg"" version ""$ver" ]]; then
+ # find which summary is missing and report
+ maintainer=`cat ../meta/conf/distro/include/distro_tracking_fields.inc | grep -e "^RECIPE_MAINTAINER_pn-"$pkg" *=" | cut -d= -f2`
+ echo "$pkg"" = ""$maintainer" >> "$REPORT_MISSING_SUMMARY"
+ fi
+done
+echo "DONE!" >> "$REPORT_LOG"
--
1.7.6
More information about the Openembedded-core
mailing list