Setting bootstrap default
Hi,
Today I experienced some unexpected behaviour from the lh_bootstrap script.
I selected LH_BOOTSTRAP=cdebootstrap on a machine that did not have
cdebootstrap installed, but did have debootstrap installed. I expected
lh_bootstrap to fail with an error in that situation. Instead, it silently
switched to debootstrap.
The code responsible is in /usr/share/live-helper/functions/defaults.sh:
# Setting bootstrap program
if [ -z "${LH_BOOTSTRAP}" ] || [ ! -x "$(which ${LH_BOOTSTRAP})" ]
then
if [ -x "/usr/sbin/debootstrap" ]
then
LH_BOOTSTRAP="debootstrap"
elif [ -x "/usr/bin/cdebootstrap" ]
then
LH_BOOTSTRAP="cdebootstrap"
else
echo "E: Can't process file /usr/sbin/debootstrap
or /usr/bin/cdebootstrap (FIXME)"
exit 1
fi
fi
I would prefer if the auto-detection is only used if LH_BOOTSTRAP is empty.
This can be accomplished by removing the " || [ ! -x "$(which
${LH_BOOTSTRAP})" ]" part.
By the way, the bootstrap stage is cached even the bootstrapping failed. I
think lh_bootstrap should either check the exit codes of lh_bootstrap_* or
the presence of the stage file before calling "lh_bootstrap_cache save".
If there is consensus that those two items should be changed as outlined
above, I can make patches. Please tell me whether I should do that.
Bye,
Maarten
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.alioth.debian.org/pipermail/debian-live-devel/attachments/20071022/d2a39fd0/attachment.htm
Reply to: