Fixed a validatie_configs output bug.
This commit is contained in:
parent
a702b4d379
commit
b12abe15b6
2 changed files with 112 additions and 34 deletions
141
CLFS/master.sh
141
CLFS/master.sh
|
@ -461,22 +461,42 @@ bm_testsuite_tools_Makefiles() { #
|
||||||
#-----------------------------#
|
#-----------------------------#
|
||||||
final_system_Makefiles() { #
|
final_system_Makefiles() { #
|
||||||
#-----------------------------#
|
#-----------------------------#
|
||||||
echo "${tab_}${GREEN}Processing... ${L_arrow}(chroot) final system${R_arrow}"
|
# Set envars and scripts for iteration targets
|
||||||
|
LOGS="" # Start with an empty global LOGS envar
|
||||||
|
if [[ -z "$1" ]] ; then
|
||||||
|
local N=""
|
||||||
|
else
|
||||||
|
local N=-build_$1
|
||||||
|
local basicsystem=""
|
||||||
|
mkdir final-system$N
|
||||||
|
cp final-system/* final-system$N
|
||||||
|
for script in final-system$N/* ; do
|
||||||
|
# Overwrite existing symlinks, files, and dirs
|
||||||
|
sed -e 's/ln -sv/&f/g' \
|
||||||
|
-e 's/mv -v/&f/g' \
|
||||||
|
-e 's/mkdir -v/&p/g' -i ${script}
|
||||||
|
done
|
||||||
|
# Remove Bzip2 binaries before make install
|
||||||
|
sed -e 's@make install@rm -vf /usr/bin/bz*\n&@' -i final-system$N/*-bzip2
|
||||||
|
# Fix how Module-Init-Tools do the install target
|
||||||
|
sed -e 's@make install@make INSTALL=install install@' -i final-system$N/*-module-init-tools
|
||||||
|
# Delete *old Readline libraries just after make install
|
||||||
|
sed -e 's@make install@&\nrm -v /lib/lib{history,readline}*old@' -i final-system$N/*-readline
|
||||||
|
fi
|
||||||
|
|
||||||
for file in final-system/* ; do
|
echo "${tab_}${GREEN}Processing... ${L_arrow}(chroot) final system$N${R_arrow}"
|
||||||
|
|
||||||
|
for file in final-system$N/* ; do
|
||||||
# Keep the script file name
|
# Keep the script file name
|
||||||
this_script=`basename $file`
|
this_script=`basename $file`
|
||||||
|
|
||||||
# Test if the stripping phase must be skipped
|
# Test if the stripping phase must be skipped.
|
||||||
|
# Skip alsp temp-perl for iterative runs
|
||||||
case $this_script in
|
case $this_script in
|
||||||
*stripping*) [[ "$STRIP" = "0" ]] && continue
|
*stripping*) [[ "$STRIP" = "0" ]] && continue ;;
|
||||||
;;
|
*temp-perl*) [[ -n "$N" ]] && continue ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# First append each name of the script files to a list (this will become
|
|
||||||
# the names of the targets in the Makefile
|
|
||||||
basicsystem="$basicsystem $this_script"
|
|
||||||
|
|
||||||
# Grab the name of the target, strip id number, XXX-script
|
# Grab the name of the target, strip id number, XXX-script
|
||||||
name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@' \
|
name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@' \
|
||||||
-e 's@temp-@@' \
|
-e 's@temp-@@' \
|
||||||
|
@ -485,22 +505,38 @@ final_system_Makefiles() { #
|
||||||
-e 's@64@@' \
|
-e 's@64@@' \
|
||||||
-e 's@n32@@'`
|
-e 's@n32@@'`
|
||||||
|
|
||||||
|
# Find the version of the command files, if it corresponds with the building of
|
||||||
|
# a specific package. We need this here to can skip scripts not needed for
|
||||||
|
# iterations rebuilds
|
||||||
vrs=`grep "^$name-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'`
|
vrs=`grep "^$name-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'`
|
||||||
|
|
||||||
|
if [[ "$vrs" = "" ]] && [[ -n "$N" ]] ; then
|
||||||
|
case "${this_script}" in
|
||||||
|
*stripping*) ;;
|
||||||
|
*) continue ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Append each name of the script files to a list (this will become
|
||||||
|
# the names of the targets in the Makefile
|
||||||
|
basicsystem="$basicsystem ${this_script}${N}"
|
||||||
|
|
||||||
|
# Append each name of the script files to a list (this will become
|
||||||
|
# the names of the logs to be moved for each iteration)
|
||||||
|
LOGS="$LOGS ${this_script}"
|
||||||
|
|
||||||
#--------------------------------------------------------------------#
|
#--------------------------------------------------------------------#
|
||||||
# >>>>>>>> START BUILDING A Makefile ENTRY <<<<<<<< #
|
# >>>>>>>> START BUILDING A Makefile ENTRY <<<<<<<< #
|
||||||
#--------------------------------------------------------------------#
|
#--------------------------------------------------------------------#
|
||||||
#
|
#
|
||||||
# Drop in the name of the target on a new line, and the previous target
|
# Drop in the name of the target on a new line, and the previous target
|
||||||
# as a dependency. Also call the echo_message function.
|
# as a dependency. Also call the echo_message function.
|
||||||
wrt_target "${this_script}" "$PREV"
|
wrt_target "${this_script}${N}" "$PREV"
|
||||||
|
|
||||||
# If $vrs isn't empty, we've got a package...
|
# If $vrs isn't empty, we've got a package...
|
||||||
if [ "$vrs" != "" ] ; then
|
if [ "$vrs" != "" ] ; then
|
||||||
case $name in
|
FILE="$name-$vrs.tar.*"
|
||||||
temp-perl) wrt_unpack2 "perl-$vrs.tar.*" ;;
|
wrt_unpack2 "$FILE"
|
||||||
*) wrt_unpack2 "$name-$vrs.tar.*" ;;
|
|
||||||
esac
|
|
||||||
fi
|
fi
|
||||||
#
|
#
|
||||||
wrt_run_as_chroot1 "${this_script}" "${file}"
|
wrt_run_as_chroot1 "${this_script}" "${file}"
|
||||||
|
@ -515,8 +551,9 @@ final_system_Makefiles() { #
|
||||||
#--------------------------------------------------------------------#
|
#--------------------------------------------------------------------#
|
||||||
#
|
#
|
||||||
# Keep the script file name for Makefile dependencies.
|
# Keep the script file name for Makefile dependencies.
|
||||||
PREV=$this_script
|
PREV=${this_script}${N}
|
||||||
|
# Set system_build envar for iteration targets
|
||||||
|
system_build=$basicsystem
|
||||||
done # for file in final-system/* ...
|
done # for file in final-system/* ...
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -524,25 +561,44 @@ final_system_Makefiles() { #
|
||||||
#-----------------------------#
|
#-----------------------------#
|
||||||
bm_final_system_Makefiles() { #
|
bm_final_system_Makefiles() { #
|
||||||
#-----------------------------#
|
#-----------------------------#
|
||||||
echo "${tab_}${GREEN}Processing... ${L_arrow}(boot) final system${R_arrow}"
|
# Set envars and scripts for iteration targets
|
||||||
|
LOGS="" # Start with an empty global LOGS envar
|
||||||
|
if [[ -z "$1" ]] ; then
|
||||||
|
local N=""
|
||||||
# The makesys phase was initiated in bm_testsuite_tools_makefile
|
# The makesys phase was initiated in bm_testsuite_tools_makefile
|
||||||
[[ "$TEST" = 0 ]] && PREV=""
|
[[ "$TEST" = 0 ]] && PREV=""
|
||||||
|
else
|
||||||
|
local N=-build_$1
|
||||||
|
local basicsystem=""
|
||||||
|
mkdir final-system$N
|
||||||
|
cp final-system/* final-system$N
|
||||||
|
for script in final-system$N/* ; do
|
||||||
|
# Overwrite existing symlinks, files, and dirs
|
||||||
|
sed -e 's/ln -sv/&f/g' \
|
||||||
|
-e 's/mv -v/&f/g' \
|
||||||
|
-e 's/mkdir -v/&p/g' -i ${script}
|
||||||
|
done
|
||||||
|
# Remove Bzip2 binaries before make install
|
||||||
|
sed -e 's@make install@rm -vf /usr/bin/bz*\n&@' -i final-system$N/*-bzip2
|
||||||
|
# Fix how Module-Init-Tools do the install target
|
||||||
|
sed -e 's@make install@make INSTALL=install install@' -i final-system$N/*-module-init-tools
|
||||||
|
# Delete *old Readline libraries just after make install
|
||||||
|
sed -e 's@make install@&\nrm -v /lib/lib{history,readline}*old@' -i final-system$N/*-readline
|
||||||
|
fi
|
||||||
|
|
||||||
for file in final-system/* ; do
|
echo "${tab_}${GREEN}Processing... ${L_arrow}(boot) final system$N${R_arrow}"
|
||||||
|
|
||||||
|
for file in final-system$N/* ; do
|
||||||
# Keep the script file name
|
# Keep the script file name
|
||||||
this_script=`basename $file`
|
this_script=`basename $file`
|
||||||
|
|
||||||
# Test if the stripping phase must be skipped
|
# Test if the stripping phase must be skipped
|
||||||
|
# Skip alsp temp-perl for iterative runs
|
||||||
case $this_script in
|
case $this_script in
|
||||||
*stripping*) [[ "$STRIP" = "0" ]] && continue
|
*stripping*) [[ "$STRIP" = "0" ]] && continue ;;
|
||||||
;;
|
*temp-perl*) [[ -n "$N" ]] && continue ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# First append each name of the script files to a list (this will become
|
|
||||||
# the names of the targets in the Makefile
|
|
||||||
basicsystem="$basicsystem $this_script"
|
|
||||||
|
|
||||||
# Grab the name of the target, strip id number, XXX-script
|
# Grab the name of the target, strip id number, XXX-script
|
||||||
name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@' \
|
name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@' \
|
||||||
-e 's@temp-@@' \
|
-e 's@temp-@@' \
|
||||||
|
@ -551,22 +607,38 @@ bm_final_system_Makefiles() { #
|
||||||
-e 's@64@@' \
|
-e 's@64@@' \
|
||||||
-e 's@n32@@'`
|
-e 's@n32@@'`
|
||||||
|
|
||||||
|
# Find the version of the command files, if it corresponds with the building of
|
||||||
|
# a specific package. We need this here to can skip scripts not needed for
|
||||||
|
# iterations rebuilds
|
||||||
vrs=`grep "^$name-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'`
|
vrs=`grep "^$name-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'`
|
||||||
|
|
||||||
|
if [[ "$vrs" = "" ]] && [[ -n "$N" ]] ; then
|
||||||
|
case "${this_script}" in
|
||||||
|
*stripping*) ;;
|
||||||
|
*) continue ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Append each name of the script files to a list (this will become
|
||||||
|
# the names of the targets in the Makefile
|
||||||
|
basicsystem="$basicsystem ${this_script}${N}"
|
||||||
|
|
||||||
|
# Append each name of the script files to a list (this will become
|
||||||
|
# the names of the logs to be moved for each iteration)
|
||||||
|
LOGS="$LOGS ${this_script}"
|
||||||
|
|
||||||
#--------------------------------------------------------------------#
|
#--------------------------------------------------------------------#
|
||||||
# >>>>>>>> START BUILDING A Makefile ENTRY <<<<<<<< #
|
# >>>>>>>> START BUILDING A Makefile ENTRY <<<<<<<< #
|
||||||
#--------------------------------------------------------------------#
|
#--------------------------------------------------------------------#
|
||||||
#
|
#
|
||||||
# Drop in the name of the target on a new line, and the previous target
|
# Drop in the name of the target on a new line, and the previous target
|
||||||
# as a dependency. Also call the echo_message function.
|
# as a dependency. Also call the echo_message function.
|
||||||
wrt_target "${this_script}" "$PREV"
|
wrt_target "${this_script}${N}" "$PREV"
|
||||||
|
|
||||||
# If $vrs isn't empty, we've got a package...
|
# If $vrs isn't empty, we've got a package...
|
||||||
if [ "$vrs" != "" ] ; then
|
if [ "$vrs" != "" ] ; then
|
||||||
case $name in
|
FILE="$name-$vrs.tar.*"
|
||||||
temp-perl) wrt_unpack3 "perl-$vrs.tar.*" ;;
|
wrt_unpack3 "$FILE"
|
||||||
*) wrt_unpack3 "$name-$vrs.tar.*" ;;
|
|
||||||
esac
|
|
||||||
fi
|
fi
|
||||||
#
|
#
|
||||||
wrt_run_as_root2 "${this_script}" "${file}"
|
wrt_run_as_root2 "${this_script}" "${file}"
|
||||||
|
@ -581,8 +653,9 @@ bm_final_system_Makefiles() { #
|
||||||
#--------------------------------------------------------------------#
|
#--------------------------------------------------------------------#
|
||||||
#
|
#
|
||||||
# Keep the script file name for Makefile dependencies.
|
# Keep the script file name for Makefile dependencies.
|
||||||
PREV=$this_script
|
PREV=${this_script}${N}
|
||||||
|
# Set system_build envar for iteration targets
|
||||||
|
system_build=$basicsystem
|
||||||
done # for file in final-system/* ...
|
done # for file in final-system/* ...
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -885,6 +958,8 @@ build_Makefile() { # Construct a Makefile from the book scripts
|
||||||
testsuite_tools_Makefiles # $testsuitetools
|
testsuite_tools_Makefiles # $testsuitetools
|
||||||
fi
|
fi
|
||||||
final_system_Makefiles # $basicsystem
|
final_system_Makefiles # $basicsystem
|
||||||
|
# Add the iterations targets, if needed
|
||||||
|
[[ "$COMPARE" != "0" ]] && wrt_compare_targets
|
||||||
bootscripts_Makefiles # $bootscripttools
|
bootscripts_Makefiles # $bootscripttools
|
||||||
bootable_Makefiles # $bootabletools
|
bootable_Makefiles # $bootabletools
|
||||||
else
|
else
|
||||||
|
@ -893,6 +968,8 @@ build_Makefile() { # Construct a Makefile from the book scripts
|
||||||
bm_testsuite_tools_Makefiles # $testsuitetools
|
bm_testsuite_tools_Makefiles # $testsuitetools
|
||||||
fi
|
fi
|
||||||
bm_final_system_Makefiles # $basicsystem
|
bm_final_system_Makefiles # $basicsystem
|
||||||
|
# Add the iterations targets, if needed
|
||||||
|
[[ "$COMPARE" != "0" ]] && wrt_compare_targets
|
||||||
bm_bootscripts_Makefiles # $bootscipttools
|
bm_bootscripts_Makefiles # $bootscipttools
|
||||||
bm_bootable_Makefiles # $bootabletoosl
|
bm_bootable_Makefiles # $bootabletoosl
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -248,7 +248,8 @@ inline_doc
|
||||||
write_error_and_die
|
write_error_and_die
|
||||||
echo
|
echo
|
||||||
;;
|
;;
|
||||||
KEYMAP) save_param=${KEYMAP}
|
KEYMAP) echo "`eval echo $PARAM_VALS`"
|
||||||
|
save_param=${KEYMAP}
|
||||||
[[ ! "${!config_param}" = "none" ]] &&
|
[[ ! "${!config_param}" = "none" ]] &&
|
||||||
KEYMAP="/usr/share/kbd/keymaps/${KEYMAP}" &&
|
KEYMAP="/usr/share/kbd/keymaps/${KEYMAP}" &&
|
||||||
validate_file -z -e -s
|
validate_file -z -e -s
|
||||||
|
|
Reference in a new issue