[coreboot-gerrit] New patch to review for coreboot: board-status: deal with sanitized paths

Patrick Georgi (pgeorgi@google.com) gerrit at coreboot.org
Mon Feb 22 03:03:24 CET 2016


Patrick Georgi (pgeorgi at google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/13766

-gerrit

commit 7580fddc6dd3f7b2d2752d3780e6d34a879c47a2
Author: Patrick Georgi <patrick at georgi-clan.de>
Date:   Mon Feb 22 03:01:57 2016 +0100

    board-status: deal with sanitized paths
    
    Change I9dd8e4027be21363015cd8df9918610e206afce2 replaces
    colons with underscores in paths, to improve compatibility of paths.
    This breaks any attempt to interpret the timestamp part of the tree
    as a timestamp, so revert the change before doing so.
    
    Change-Id: I0e82e4045120700e9b4fcc8c6e54d761068eaea3
    Signed-off-by: Patrick Georgi <patrick at georgi-clan.de>
---
 util/board_status/to-wiki/bucketize.sh | 2 +-
 util/board_status/to-wiki/towiki.sh    | 9 +++++----
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/util/board_status/to-wiki/bucketize.sh b/util/board_status/to-wiki/bucketize.sh
index e85fc3e..78906fd 100755
--- a/util/board_status/to-wiki/bucketize.sh
+++ b/util/board_status/to-wiki/bucketize.sh
@@ -19,7 +19,7 @@ quarterly() {
 
 curr=""
 sort -r -k4 -t/ | while read file; do
-	timestamp=`printf $file | cut -d/ -f4`
+	timestamp=`printf $file | cut -d/ -f4 | tr _ :`
 	new=`$1 $timestamp`
 	if [ "$new" != "$curr" ]; then
 		if [ "$curr" != "" ]; then
diff --git a/util/board_status/to-wiki/towiki.sh b/util/board_status/to-wiki/towiki.sh
index 85334ef..9cf8a3c 100755
--- a/util/board_status/to-wiki/towiki.sh
+++ b/util/board_status/to-wiki/towiki.sh
@@ -17,9 +17,10 @@ while read line; do
 	for i in $rest; do
 		vendor_board=`echo $i | cut -d/ -f1-2`
 		commit=`echo $i | cut -d/ -f3`
-		datetime=`echo $i | cut -d/ -f4`
+		datetime_path=`echo $i | cut -d/ -f4`
+		datetime=`echo $datetime_path | tr _ :`
 		datetime_human=`LC_ALL=C TZ=UTC date --date="$datetime"`
-		upstream=`grep "^Upstream revision:" $vendor_board/$commit/$datetime/revision.txt |cut -d: -f2-`
+		upstream=`grep "^Upstream revision:" $vendor_board/$commit/$datetime_path/revision.txt |cut -d: -f2-`
 		upstream=`git log -1 --format=%H $upstream`
 		if ! echo "$have"| grep  "^$vendor_board:" > /dev/null; then
 			detailed="$detailed<span id=\"$vendor_board\"></span>$nl"
@@ -28,8 +29,8 @@ while read line; do
 
 		detailed="$detailed[[Board:$vendor_board|$vendor_board]] at $datetime_human$nl"
 		detailed="$detailed[$CODE_GITWEB$upstream upstream tree] ($nl"
-		for file in "$vendor_board/$commit/$datetime/"*; do
-			if [ "$file" = "$vendor_board/$commit/$datetime/revision.txt" ]; then
+		for file in "$vendor_board/$commit/$datetime_path/"*; do
+			if [ "$file" = "$vendor_board/$commit/$datetime_path/revision.txt" ]; then
 				continue
 			fi
 			detailed="$detailed[$STATUS_GITWEB$file `basename $file`] $nl"



More information about the coreboot-gerrit mailing list