Package management: compute times and sizes without packing times and sizes
This commit is contained in:
parent
322226dbf8
commit
9bbb9c83f3
4 changed files with 13 additions and 4 deletions
|
@ -1070,7 +1070,6 @@ menu "Advanced Features"
|
||||||
depends !BOOK_BLFS
|
depends !BOOK_BLFS
|
||||||
|
|
||||||
config REPORT
|
config REPORT
|
||||||
depends !PKGMNGT
|
|
||||||
bool "Create SBU and disk usage report"
|
bool "Create SBU and disk usage report"
|
||||||
default y
|
default y
|
||||||
|
|
||||||
|
|
12
LFS/lfs.xsl
12
LFS/lfs.xsl
|
@ -259,7 +259,9 @@ rm -fv /sbin/nologin
|
||||||
</xsl:text>
|
</xsl:text>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:text>'
|
<xsl:text>'
|
||||||
|
PREV_SEC=${SECONDS}
|
||||||
packInstall
|
packInstall
|
||||||
|
SECONDS=${PREV_SEC}
|
||||||
</xsl:text>
|
</xsl:text>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
|
@ -297,7 +299,9 @@ done
|
||||||
for dir in $PKG_DEST/{boot,etc,lib,bin,sbin}; do
|
for dir in $PKG_DEST/{boot,etc,lib,bin,sbin}; do
|
||||||
[[ -z $(ls $dir) ]] && rmdir -v $dir
|
[[ -z $(ls $dir) ]] && rmdir -v $dir
|
||||||
done
|
done
|
||||||
|
PREV_SEC=${SECONDS}
|
||||||
packInstall
|
packInstall
|
||||||
|
SECONDS=${PREV_SEC}
|
||||||
rm -rf $PKG_DEST
|
rm -rf $PKG_DEST
|
||||||
</xsl:text>
|
</xsl:text>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
|
@ -371,7 +375,9 @@ cd $PKGDIR
|
||||||
@role != 'nodump']/userinput[@remap != 'adjust']"
|
@role != 'nodump']/userinput[@remap != 'adjust']"
|
||||||
mode="pkgmngt"/>
|
mode="pkgmngt"/>
|
||||||
<xsl:if test="$dirname = 'chapter06'">
|
<xsl:if test="$dirname = 'chapter06'">
|
||||||
<xsl:text>packInstall
|
<xsl:text>PREV_SEC=${SECONDS}
|
||||||
|
packInstall
|
||||||
|
SECONDS=${PREV_SEC}
|
||||||
rm -rf "$PKG_DEST"
|
rm -rf "$PKG_DEST"
|
||||||
</xsl:text>
|
</xsl:text>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
|
@ -573,7 +579,9 @@ PKGDIR=$(dirname $PKGDIR)/tzdata-</xsl:text>
|
||||||
<xsl:text>ZONEINFO=$PKG_DEST</xsl:text>
|
<xsl:text>ZONEINFO=$PKG_DEST</xsl:text>
|
||||||
<xsl:copy-of select="substring-after(string(),'ZONEINFO=')"/>
|
<xsl:copy-of select="substring-after(string(),'ZONEINFO=')"/>
|
||||||
<xsl:text>
|
<xsl:text>
|
||||||
|
PREV_SEC=${SECONDS}
|
||||||
packInstall
|
packInstall
|
||||||
|
SECONDS=${PREV_SEC}
|
||||||
rm -rf $PKG_DEST
|
rm -rf $PKG_DEST
|
||||||
</xsl:text>
|
</xsl:text>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
|
@ -584,7 +592,9 @@ wrapInstall '
|
||||||
ZONEINFO=</xsl:text>
|
ZONEINFO=</xsl:text>
|
||||||
<xsl:copy-of select="substring-after(string(),'ZONEINFO=')"/>
|
<xsl:copy-of select="substring-after(string(),'ZONEINFO=')"/>
|
||||||
<xsl:text>'
|
<xsl:text>'
|
||||||
|
PREV_SEC=${SECONDS}
|
||||||
packInstall
|
packInstall
|
||||||
|
SECONDS=${PREV_SEC}
|
||||||
</xsl:text>
|
</xsl:text>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
|
|
|
@ -121,7 +121,7 @@ done
|
||||||
# For printing the last 'Installed files disk usage', we need to 'du' the
|
# For printing the last 'Installed files disk usage', we need to 'du' the
|
||||||
# root dir, excluding the jhalfs directory (and lost+found). We assume
|
# root dir, excluding the jhalfs directory (and lost+found). We assume
|
||||||
# that the rootdir is $LOGSDIR/../..
|
# that the rootdir is $LOGSDIR/../..
|
||||||
DU1=`du -skx --exclude=jhalfs --exclude=lost+found $LOGSDIR/../.. | cut -f1`
|
DU1=`du -skx --exclude=jhalfs --exclude=lost+found --exclude /var/lib $LOGSDIR/../.. | cut -f1`
|
||||||
DU1MB=`perl -e 'printf "%.3f" , ('$DU1' / '1024')';`
|
DU1MB=`perl -e 'printf "%.3f" , ('$DU1' / '1024')';`
|
||||||
INSTALL=`perl -e 'print ('$DU1' - '$DU1PREV')';`
|
INSTALL=`perl -e 'print ('$DU1' - '$DU1PREV')';`
|
||||||
INSTALLMB=`perl -e 'printf "%.3f" , ('$DU1MB' - '$DU1MBPREV')';`
|
INSTALLMB=`perl -e 'printf "%.3f" , ('$DU1MB' - '$DU1MBPREV')';`
|
||||||
|
|
|
@ -39,7 +39,7 @@ crFILELOGDIR = /\$(SCRIPT_ROOT)/$FILELOGDIRBASE
|
||||||
SU_LUSER = sudo -u \$(LUSER) -i sh -c
|
SU_LUSER = sudo -u \$(LUSER) -i sh -c
|
||||||
LUSER_HOME = \$(LHOME)/\$(LUSER)
|
LUSER_HOME = \$(LHOME)/\$(LUSER)
|
||||||
PRT_DU = echo -e "\nKB: \`du -skx --exclude=\$(SCRIPT_ROOT) --exclude=lost+found \$(MOUNT_PT) \`\n"
|
PRT_DU = echo -e "\nKB: \`du -skx --exclude=\$(SCRIPT_ROOT) --exclude=lost+found \$(MOUNT_PT) \`\n"
|
||||||
PRT_DU_CR = echo -e "\nKB: \`du -skx --exclude=\$(SCRIPT_ROOT) --exclude=lost+found / \`\n"
|
PRT_DU_CR = echo -e "\nKB: \`du -skx --exclude=\$(SCRIPT_ROOT) --exclude=lost+found --exclude /var/lib / \`\n"
|
||||||
|
|
||||||
ADD_REPORT = $REPORT
|
ADD_REPORT = $REPORT
|
||||||
ADD_CUSTOM_TOOLS = $CUSTOM_TOOLS
|
ADD_CUSTOM_TOOLS = $CUSTOM_TOOLS
|
||||||
|
|
Reference in a new issue