From 5451eaeb9e989f7191ebc07b7a3387297d516b80 Mon Sep 17 00:00:00 2001 From: Pierre Labastie Date: Mon, 15 Jul 2019 20:06:35 +0000 Subject: [PATCH] Fix generation of the SBU-DU stats: The "create-sbu_du.sh" script expects all the logs containing "Totalseconds" also contains two lines starting with "KB:" with disk usage stats. Generates those lines for all the logs. Hopefully, the stats are fairly accurate now... --- LFS/lfs.xsl | 83 +++++++++++++++++++++++++++++------------------------ 1 file changed, 45 insertions(+), 38 deletions(-) diff --git a/LFS/lfs.xsl b/LFS/lfs.xsl index 9426dd8..322f24f 100644 --- a/LFS/lfs.xsl +++ b/LFS/lfs.xsl @@ -171,11 +171,9 @@ set -e - - - - - + + + echo -e "\n\nTotalseconds: $SECONDS\n" - - - + exit @@ -1151,60 +1147,68 @@ LOGLEVEL=" - + +PREV_SEC=${SECONDS} + if [ -h /tools ]; then ROOT=$(dirname $(readlink /tools))/ else ROOT=/ fi -SRC_DIR=${ROOT}sources - -PREV_SEC=${SECONDS} - -VERSION= - - -PKG_DEST=${SRC_DIR}/ - - - - - - -PACKAGE= - - - - SCRIPT_ROOT= - + +SRC_DIR=${ROOT}sources + +VERSION= + + +PKG_DEST=${SRC_DIR}/ + + - + + + +PACKAGE= + + + + + source ${ROOT}${SCRIPT_ROOT}/packInstall.sh export -f packInstall - - + + export -f wrapInstall + - - + cd $SRC_DIR PKGDIR=$(tar -tf $PACKAGE | head -n1 | sed 's@^./@@;s@/.*@@') export PKGDIR VERSION PKG_DEST if [ -d "$PKGDIR" ]; then rm -rf $PKGDIR; fi if [ -d "${PKGDIR%-*}-build" ]; then rm -rf ${PKGDIR%-*}-build; fi - -echo "KB: $(du -skx --exclude=lost+found --exclude=/var/lib --exclude=$SCRIPT_ROOT $ROOT)" + + + +echo "KB: $(du -skx --exclude=lost+found --exclude=var/lib --exclude=$SCRIPT_ROOT $ROOT)" + + + tar -xf $PACKAGE cd $PKGDIR -SECONDS=${PREV_SEC} + + + SECONDS=${PREV_SEC} # Start of LFS book script @@ -1214,11 +1218,14 @@ SECONDS=${PREV_SEC} # End of LFS book script -echo "KB: $(du -skx --exclude=lost+found --exclude=/var/lib --exclude=$SCRIPT_ROOT $ROOT)" -cd $SRC_DIR +echo "KB: $(du -skx --exclude=lost+found --exclude=var/lib --exclude=$SCRIPT_ROOT $ROOT)" + + + cd $SRC_DIR rm -rf $PKGDIR if [ -d "${PKGDIR%-*}-build" ]; then rm -rf ${PKGDIR%-*}-build; fi +