Fixed du bug related to lost+found permissions.

Using PRT_DU and PRT_DU_CHR in all places.
Using logs/$@ in all places.
Fixed du meassurament in LFS build for changingowner and kernfs scripts.
This commit is contained in:
Manuel Canales Esparcia 2006-11-01 15:41:52 +00:00
parent 03a18bf482
commit 8bea2c8811
5 changed files with 25 additions and 18 deletions

View file

@ -1146,8 +1146,8 @@ crTESTLOGDIR = /\$(SCRIPT_ROOT)/test-logs
SU_LUSER = su - \$(LUSER) -c
LUSER_HOME = /home/\$(LUSER)
PRT_DU = echo -e "\nKB: \`du -skx --exclude=jhalfs \$(MOUNT_PT)\`\n"
PRT_DU_CR = echo -e "\nKB: \`du -skx --exclude=\$(SCRIPT_ROOT) / \`\n"
PRT_DU = echo -e "\nKB: \`du -skx --exclude=jhalfs --exclude=lost+found \$(MOUNT_PT)\`\n"
PRT_DU_CR = echo -e "\nKB: \`du -skx --exclude=\$(SCRIPT_ROOT) --exclude=lost+found / \`\n"
export PATH := \${PATH}:/usr/sbin

View file

@ -450,7 +450,7 @@ LOGDIR = \$(BASEDIR)/\$(SCRIPT_ROOT)/logs
TESTLOGDIR = \$(BASEDIR)/\$(SCRIPT_ROOT)/test-logs
SU_LUSER = su - \$(LUSER) -c
PRT_DU = echo -e "\nKB: \`du -skx --exclude=jhalfs \$(MOUNT_PT)\`\n"
PRT_DU = echo -e "\nKB: \`du -skx --exclude=jhalfs --exclude=lost+found \$(MOUNT_PT)\`\n"
LUSER_HOME = /home/\$(LUSER)
export PATH := \${PATH}:/usr/sbin

View file

@ -518,8 +518,8 @@ crTESTLOGDIR = /\$(SCRIPT_ROOT)/test-logs
SU_LUSER = su - \$(LUSER) -c
LUSER_HOME = /home/\$(LUSER)
PRT_DU = echo -e "\nKB: \`du -skx --exclude=jhalfs \$(MOUNT_PT)\`\n"
PRT_DU_CR = echo -e "\nKB: \`du -skx --exclude=\$(SCRIPT_ROOT) / \`\n"
PRT_DU = echo -e "\nKB: \`du -skx --exclude=jhalfs --exclude=lost+found \$(MOUNT_PT)\`\n"
PRT_DU_CR = echo -e "\nKB: \`du -skx --exclude=\$(SCRIPT_ROOT) --exclude=lost+found / \`\n"
export PATH := \${PATH}:/usr/sbin

View file

@ -225,7 +225,12 @@ chapter6_Makefiles() {
#
# Drop in the name of the target on a new line, and the previous target
# as a dependency. Also call the echo_message function.
CHROOT_wrt_target "${this_script}${N}" "$PREV"
# In the mount of kernel filesystems we need to set LFS
# and not to use chroot.
case "${this_script}" in
*kernfs) LUSER_wrt_target "${this_script}" "$PREV" ;;
*) CHROOT_wrt_target "${this_script}${N}" "$PREV" ;;
esac
# If $pkg_tarball isn't empty, we've got a package...
# Insert instructions for unpacking the package and changing directories
@ -402,8 +407,8 @@ crTESTLOGDIR = /\$(SCRIPT_ROOT)/test-logs
SU_LUSER = su - \$(LUSER) -c
LUSER_HOME = /home/\$(LUSER)
PRT_DU = echo -e "\nKB: \`du -skx --exclude=\$(SCRIPT_ROOT) \$(MOUNT_PT) \`\n"
PRT_DU_CR = echo -e "\nKB: \`du -skx --exclude=\$(SCRIPT_ROOT) / \`\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"
export PATH := \${PATH}:/usr/sbin

View file

@ -66,7 +66,7 @@ unset wrt_RunaAsRoot
#----------------------------------#
wrt_RunAsRoot() { # Some scripts must be run as root..
#----------------------------------#
local ENV_MOUNT
local MOUNT_ENV
local this_script=$1
local file=$2
@ -82,7 +82,7 @@ wrt_RunAsRoot() { # Some scripts must be run as root..
(
cat << EOF
@( time { export ${MOUNT_ENV}=\$(MOUNT_PT) && ${PROGNAME}-commands/`dirname $file`/\$@ >>logs/\$@ 2>&1 ; } ) 2>>logs/\$@ && \\
\$(PRT_DU_CR) >>logs/\$@
\$(PRT_DU) >>logs/\$@
EOF
) >> $MKFILE.tmp
}
@ -97,8 +97,8 @@ ROOT_RunAsRoot() { #
local file=$1
(
cat << EOF
@( time { source envars && \$(CMDSDIR)/$file >>logs/$this_script 2>&1 ; } ) 2>>logs/$this_script && \\
\$(PRT_DU_CR) >>logs/$this_script
@( time { source envars && \$(CMDSDIR)/$file >>logs/\$@ 2>&1 ; } ) 2>>logs/\$@ && \\
\$(PRT_DU_CR) >>logs/\$@
EOF
) >> $MKFILE.tmp
}
@ -139,7 +139,8 @@ cat << EOF
$i: $PREV
@\$(call echo_message, Building)
@./progress_bar.sh \$@ \$\$PPID &
@echo -e "\n\`date\`\n\nKB: \`du -skx --exclude=\$(SCRIPT_ROOT) \$(MOUNT_PT)\`\n" >logs/\$@
@echo -e "\n\`date\`\n" >logs/\$@ &
@\$(PRT_DU) >>logs/\$@
EOF
) >> $MKFILE.tmp
}
@ -228,7 +229,7 @@ CHROOT_wrt_target() { # Create target and initialize log file
local PREV=$2
case $i in
iteration* ) local LOGFILE="${this_script}.log" ;;
* ) local LOGFILE="${this_script}" ;;
* ) local LOGFILE="\$@" ;;
esac
(
cat << EOF
@ -236,7 +237,8 @@ cat << EOF
$i: $PREV
@\$(call echo_message, Building)
@./progress_bar.sh \$@ \$\$PPID &
@echo -e "\n\`date\`\n\nKB: \`du -skx --exclude=\$(SCRIPT_ROOT) / \`\n" >logs/$LOGFILE
@echo -e "\n\`date\`\n" >logs/$LOGFILE &
@\$(PRT_DU_CR) >>logs/$LOGFILE
EOF
) >> $MKFILE.tmp
}
@ -283,8 +285,8 @@ CHROOT_wrt_RunAsRoot() { #
local file=$1
(
cat << EOF
@( time { source envars && \$(crCMDSDIR)/$file >>logs/$this_script 2>&1 ; } ) 2>>logs/$this_script && \\
\$(PRT_DU_CR) >>logs/$this_script
@( time { source envars && \$(crCMDSDIR)/$file >>logs/\$@ 2>&1 ; } ) 2>>logs/\$@ && \\
\$(PRT_DU_CR) >>logs/\$@
EOF
) >> $MKFILE.tmp
@ -296,7 +298,7 @@ CHROOT_wrt_CopyFstab() { #
#----------------------------------#
(
cat << EOF
@( time { cp -v /sources/fstab /etc/fstab >>logs/${this_script} 2>&1 ; } ) 2>>logs/${this_script}
@( time { cp -v /sources/fstab /etc/fstab >>logs/\$@ 2>&1 ; } ) 2>>logs/\$@
EOF
) >> $MKFILE.tmp
}