Fixes:
- when the user fstab and/or kernel config are the same as the ones in $BUILDDIR/sources: avoid to cp on itself - set SRC_ARCHIVE=/dev/null in BLFS tools download script if SRC_ARCHIVE is empty
This commit is contained in:
parent
5253014591
commit
deb6b6c8fd
3 changed files with 17 additions and 6 deletions
|
@ -378,10 +378,13 @@ boot_Makefiles() { #
|
|||
*grub | *aboot | *colo | *silo | *arcload | *lilo | *introduction ) continue ;;
|
||||
*how-to-view*) continue ;;
|
||||
*whatnext*) continue ;;
|
||||
*fstab) [[ ! -z ${FSTAB} ]] && cp ${FSTAB} $BUILDDIR/sources/fstab ;;
|
||||
*fstab) [[ ! -z ${FSTAB} ]] &&
|
||||
[[ ${FSTAB} == $BUILDDIR/sources/fstab ]] ||
|
||||
cp ${FSTAB} $BUILDDIR/sources/fstab ;;
|
||||
*kernel) # if there is no kernel config file do not build the kernel
|
||||
[[ -z $CONFIG ]] && continue
|
||||
[[ -z $BOOT_CONFIG ]] && continue
|
||||
# Copy the config file to /sources with a standardized name
|
||||
[[ ${BOOT_CONFIG} == $BUILDDIR/sources/bootkernel-config ]] ||
|
||||
cp $BOOT_CONFIG $BUILDDIR/sources/bootkernel-config
|
||||
;;
|
||||
esac
|
||||
|
@ -734,7 +737,9 @@ bootscripts_Makefiles() { #
|
|||
*udev) continue ;; # This is not a script but a commentary, we want udev-rules
|
||||
*console*) continue ;; # Use the files that came with the bootscripts
|
||||
# fstab is now here (for 3.x.y)
|
||||
*fstab) [[ ! -z ${FSTAB} ]] && cp ${FSTAB} $BUILDDIR/sources/fstab ;;
|
||||
*fstab) [[ ! -z ${FSTAB} ]] &&
|
||||
[[ ${FSTAB} == $BUILDDIR/sources/fstab ]] ||
|
||||
cp ${FSTAB} $BUILDDIR/sources/fstab ;;
|
||||
*) ;;
|
||||
esac
|
||||
|
||||
|
@ -907,10 +912,13 @@ bootable_Makefiles() { #
|
|||
# A little housekeeping on the scripts
|
||||
case $this_script in
|
||||
*grub | *aboot | *colo | *silo | *arcload | *lilo | *reboot* ) continue ;;
|
||||
*fstab) [[ ! -z ${FSTAB} ]] && cp ${FSTAB} $BUILDDIR/sources/fstab ;;
|
||||
*fstab) [[ ! -z ${FSTAB} ]] &&
|
||||
[[ ${FSTAB} == $BUILDDIR/sources/fstab ]] ||
|
||||
cp ${FSTAB} $BUILDDIR/sources/fstab ;;
|
||||
*kernel) # if there is no kernel config file do not build the kernel
|
||||
[[ -z $CONFIG ]] && continue
|
||||
# Copy the config file to /sources with a standardized name
|
||||
[[ $CONFIG == $BUILDDIR/sources/kernel-config ]] ||
|
||||
cp $CONFIG $BUILDDIR/sources/kernel-config
|
||||
;;
|
||||
esac
|
||||
|
|
|
@ -312,8 +312,11 @@ chapter78_Makefiles() {
|
|||
# If no .config file is supplied, the kernel build is skipped
|
||||
case ${this_script} in
|
||||
*grub) continue ;;
|
||||
*fstab) [[ ! -z ${FSTAB} ]] && cp ${FSTAB} $BUILDDIR/sources/fstab ;;
|
||||
*fstab) [[ ! -z ${FSTAB} ]] &&
|
||||
[[ ${FSTAB} == $BUILDDIR/sources/fstab ]] ||
|
||||
cp ${FSTAB} $BUILDDIR/sources/fstab ;;
|
||||
*kernel) [[ -z ${CONFIG} ]] && continue
|
||||
[[ ${CONFIG} == $BUILDDIR/sources/kernel-config ]] ||
|
||||
cp ${CONFIG} $BUILDDIR/sources/kernel-config ;;
|
||||
esac
|
||||
|
||||
|
|
|
@ -146,7 +146,7 @@ pushd $BUILDDIR/sources
|
|||
sudo find . -name unpacked -exec rm \{\} \;
|
||||
if [ "$GETPKG" = "y" ]; then
|
||||
FTP_SERVER=$SERVER/pub/blfs/ \
|
||||
SRC_ARCHIVE=$SRC_ARCHIVE \
|
||||
SRC_ARCHIVE=${SRC_ARCHIVE:-/dev/null} \
|
||||
$BUILDDIR$BLFS_ROOT/download_script
|
||||
else # Save the download script in case the user wants to run it later
|
||||
cp $BUILDDIR$BLFS_ROOT/download_script .
|
||||
|
|
Reference in a new issue