tidy up Echo_breakage()

- it's only used by the debootstrap script after alternatives were dropped
   long ago, so let's move it, avoiding it being loaded for everything
   else.
 - there's no need to pass printing another message through it.
 - there's little point in making the sid distinction if you happen to
   decide to build sid, it's a given that it's less stable than stable.

really, is there any need for this at all?

Gbp-Dch: Ignore
This commit is contained in:
Lyndon Brown 2020-05-02 13:05:03 +01:00
parent d7d0798e46
commit 5f318c5a44
2 changed files with 9 additions and 16 deletions

View File

@ -88,17 +88,3 @@ Echo_file ()
echo "${1}: ${LINE}" >&3 echo "${1}: ${LINE}" >&3
done < "${1}" done < "${1}"
} }
Echo_breakage ()
{
case "${LB_PARENT_DISTRIBUTION_BINARY}" in
sid)
Echo_message "If the following stage fails, the most likely cause of the problem is with your mirror configuration, a caching proxy or the sid distribution."
;;
*)
Echo_message "If the following stage fails, the most likely cause of the problem is with your mirror configuration or a caching proxy."
;;
esac
Echo_message "${@}"
}

View File

@ -42,6 +42,11 @@ Check_stagefile "bootstrap_cache.restore"
# Acquire lock file # Acquire lock file
Acquire_lockfile Acquire_lockfile
Print_breakage ()
{
Echo_message "If the following stage fails, the most likely cause of the problem is with your mirror configuration or a caching proxy."
}
# Creating chroot directory # Creating chroot directory
mkdir -p chroot mkdir -p chroot
@ -79,7 +84,8 @@ then
cp cache/packages.bootstrap/*.deb chroot/var/cache/apt/archives cp cache/packages.bootstrap/*.deb chroot/var/cache/apt/archives
fi fi
Echo_breakage "Running debootstrap (download-only)... " Print_breakage
Echo_message "Running debootstrap (download-only)..."
debootstrap ${DEBOOTSTRAP_OPTIONS} --download-only "${LB_PARENT_DISTRIBUTION_CHROOT}" chroot "${LB_PARENT_MIRROR_BOOTSTRAP}" ${DEBOOTSTRAP_SCRIPT} debootstrap ${DEBOOTSTRAP_OPTIONS} --download-only "${LB_PARENT_DISTRIBUTION_CHROOT}" chroot "${LB_PARENT_MIRROR_BOOTSTRAP}" ${DEBOOTSTRAP_SCRIPT}
# Removing old cache # Removing old cache
@ -90,7 +96,8 @@ then
cp chroot/var/cache/apt/archives/*.deb cache/packages.bootstrap cp chroot/var/cache/apt/archives/*.deb cache/packages.bootstrap
fi fi
Echo_breakage "Running debootstrap... " Print_breakage
Echo_message "Running debootstrap..."
# Run appropriate bootstrap, i.e. foreign or regular bootstrap # Run appropriate bootstrap, i.e. foreign or regular bootstrap
if [ "${LB_BOOTSTRAP_QEMU_ARCHITECTURE}" = "${LB_ARCHITECTURE}" ]; then if [ "${LB_BOOTSTRAP_QEMU_ARCHITECTURE}" = "${LB_ARCHITECTURE}" ]; then