debootstrap: remove redundant check
the check for existence of debootstrap here was completely redundant since there is a check at the beginning of the file which already outputs an appropriate error and exists if missing.
This commit is contained in:
parent
d79fd1e760
commit
e3da1b6f8d
|
@ -72,10 +72,8 @@ then
|
|||
DEBOOTSTRAP_OPTIONS="${DEBOOTSTRAP_OPTIONS} --no-check-gpg"
|
||||
fi
|
||||
|
||||
if [ $(which debootstrap) ]
|
||||
if [ "${LB_CACHE_PACKAGES}" = "true" ]
|
||||
then
|
||||
if [ "${LB_CACHE_PACKAGES}" = "true" ]
|
||||
then
|
||||
if ls cache/packages.bootstrap/*.deb > /dev/null 2>&1
|
||||
then
|
||||
mkdir -p chroot/var/cache/apt/archives
|
||||
|
@ -91,12 +89,12 @@ then
|
|||
# Saving new cache
|
||||
mkdir -p cache/packages.bootstrap
|
||||
cp chroot/var/cache/apt/archives/*.deb cache/packages.bootstrap
|
||||
fi
|
||||
fi
|
||||
|
||||
Echo_breakage "Running debootstrap... "
|
||||
Echo_breakage "Running debootstrap... "
|
||||
|
||||
# Run appropriate bootstrap, i.e. foreign or regular bootstrap
|
||||
if [ "${LB_BOOTSTRAP_QEMU_ARCHITECTURES}" = "${LB_ARCHITECTURES}" ]; then
|
||||
# Run appropriate bootstrap, i.e. foreign or regular bootstrap
|
||||
if [ "${LB_BOOTSTRAP_QEMU_ARCHITECTURES}" = "${LB_ARCHITECTURES}" ]; then
|
||||
|
||||
if [ -n "${LB_BOOTSTRAP_QEMU_EXCLUDE}" ]
|
||||
then
|
||||
|
@ -109,19 +107,15 @@ then
|
|||
Echo_message "Running debootstrap second stage under QEMU"
|
||||
cp ${LB_BOOTSTRAP_QEMU_STATIC} chroot/usr/bin
|
||||
Chroot chroot /bin/sh /debootstrap/debootstrap --second-stage ${FOREIGN_DEBOOTSTRAP_OPTIONS}
|
||||
else
|
||||
debootstrap ${DEBOOTSTRAP_OPTIONS} "${LB_PARENT_DISTRIBUTION_CHROOT}" chroot "${LB_PARENT_MIRROR_BOOTSTRAP}" ${DEBOOTSTRAP_SCRIPT}
|
||||
fi
|
||||
|
||||
# Deconfiguring debootstrap configurations
|
||||
rm -f chroot/etc/hosts
|
||||
|
||||
# Removing bootstrap cache
|
||||
rm -f chroot/var/cache/apt/archives/*.deb
|
||||
|
||||
# Creating stage file
|
||||
Create_stagefile .build/bootstrap
|
||||
else
|
||||
Echo_error "Can't find program debootstrap (FIXME)"
|
||||
exit 1
|
||||
debootstrap ${DEBOOTSTRAP_OPTIONS} "${LB_PARENT_DISTRIBUTION_CHROOT}" chroot "${LB_PARENT_MIRROR_BOOTSTRAP}" ${DEBOOTSTRAP_SCRIPT}
|
||||
fi
|
||||
|
||||
# Deconfiguring debootstrap configurations
|
||||
rm -f chroot/etc/hosts
|
||||
|
||||
# Removing bootstrap cache
|
||||
rm -f chroot/var/cache/apt/archives/*.deb
|
||||
|
||||
# Creating stage file
|
||||
Create_stagefile .build/bootstrap
|
||||
|
|
Loading…
Reference in New Issue