Clean up D-I Lenny RC1 compatibility code

This commit is contained in:
Frans Pop 2009-01-30 05:00:16 +00:00
parent 5032d25183
commit 69e3f1fa76
3 changed files with 14 additions and 27 deletions

2
debian/changelog vendored
View File

@ -6,6 +6,8 @@ debian-cd (3.1.1) UNRELEASED; urgency=low
Jonathan Hall for the patch. Closes: #513421
* boot-x86: drop support for no longer really useful ISOLINUX_DEFAULT
environment variable (see #512303 for discussion).
* x86: clean up compatibility code that was needed for D-I Lenny RC1
isolinux configuration files.
-- Frans Pop <fjp@debian.org> Tue, 20 Jan 2009 01:30:11 +0100

View File

@ -218,8 +218,6 @@ if [ "$THISTYPE" = "isolinux" ]; then
rm -f boot$N/isolinux/amdgtk.cfg
rm -f boot$N/isolinux/adgtk.cfg
rm -f boot$N/isolinux/amdadgtk.cfg
# For Lenny RC1 compatibility
rm -f boot$N/isolinux/adamdgtk.cfg
fi
rm -f boot$N/isolinux/isolinux.cfg.with*
@ -236,8 +234,7 @@ if [ "$THISTYPE" = "isolinux" ]; then
if [ -z "$MULTIARCH" ]; then
# Set up isolinux dir for only the current arch
# Last two for Lenny RC1 compatibility
for f in txt.cfg gtk.cfg adtxt.cfg adgtk.cfg text.cfg adtext.cfg; do
for f in txt.cfg gtk.cfg adtxt.cfg adgtk.cfg; do
if [ -e boot$N/isolinux/$f ]; then
sed -i "s|/install/|/$INSTALLDIR/|" boot$N/isolinux/$f
fi
@ -246,19 +243,14 @@ if [ "$THISTYPE" = "isolinux" ]; then
# Remove the amd*.cfg files to avoid them being loaded on a
# disc that does not have both amd64 and i386 dirs.
rm -f boot$N/isolinux/amd*.cfg
# For Lenny RC1 compatibility
rm -f boot$N/isolinux/adamd*.cfg
else
# Set up isolinux dir for multi-arch
# Last two for Lenny RC1 compatibility
for f in txt.cfg gtk.cfg adtxt.cfg adgtk.cfg text.cfg adtext.cfg; do
for f in txt.cfg gtk.cfg adtxt.cfg adgtk.cfg; do
if [ -e boot$N/isolinux/$f ]; then
sed -i "s|/install/|/$INSTALLDIR_i386/|" boot$N/isolinux/$f
fi
done
# Last three for Lenny RC1 compatibility
for f in amdtxt.cfg amdgtk.cfg amdadtxt.cfg amdadgtk.cfg \
amdtext.cfg adamdtext.cfg adamdgtk.cfg; do
for f in amdtxt.cfg amdgtk.cfg amdadtxt.cfg amdadgtk.cfg; do
if [ -e boot$N/isolinux/$f ]; then
sed -i "s|/install/|/$INSTALLDIR_amd64/|" boot$N/isolinux/$f
fi
@ -285,11 +277,10 @@ if [ "$THISTYPE" = "isolinux" ]; then
# Instead, add special default label to automatically select
# i386/amd64 if user hits enter from help screens.
cp -f $CDDIR/../syslinux/usr/lib/syslinux/ifcpu64.c32 boot$N/isolinux/
# text.cfg and amdtext.cfg for Lenny RC1 compatibility.
sed -i "/^default install/ s/^/#/" \
boot$N/isolinux/txt.cfg boot$N/isolinux/text.cfg || true
boot$N/isolinux/txt.cfg || true
sed -i "/^default64 amd64-install/ s/^/#/" \
boot$N/isolinux/amdtxt.cfg boot$N/isolinux/amdtext.cfg || true
boot$N/isolinux/amdtxt.cfg || true
sed -i "/^include menu.cfg/ a\include instsel.cfg" \
boot$N/isolinux/prompt.cfg
cat >boot$N/isolinux/instsel.cfg <<EOF

View File

@ -7,13 +7,10 @@
# With two characters to identify the desktop environment this will leave
# as maximum for example: amdatlx.cfg or amdtxtlx.cfg.
# FIXME: Various statements include Lenny RC1 compatability code:
# '(amd)?', 'te?xt' in regexps and anything with 'text' config files
make_desktop_template() {
# Split rescue labels out of advanced options files
for file in boot$N/isolinux/*ad*.cfg; do
rq_file="$(echo "$file" | sed -r "s:/(amd)?ad:/\1rq:; s:text:txt:")"
rq_file="$(echo "$file" | sed -r "s:/(amd)?ad:/\1rq:")"
sed -rn "s:desktop=[^ ]*::
/^label (amd64-)?rescue/,+3 p" $file >$rq_file
sed -ri "/^label (amd64-)?rescue/ i\include $(basename $rq_file)
@ -29,8 +26,8 @@ make_desktop_template() {
s:config :config %desktop%/:" \
boot$N/isolinux/desktop/menu.cfg
cp boot$N/isolinux/desktop/menu.cfg boot$N/isolinux/desktop/prmenu.cfg
sed -ri "s:(include.*(te?xt|gtk))(\.cfg):\1dt\3:
/include.*(te?xt|gtk)/ {s:ad(amd)?te?xt:\1at:; s:ad(amd)?gtk:\1ag:; s:text:txt:}" \
sed -ri "s:(include.*(txt|gtk))(\.cfg):\1dt\3:
/include.*(txt|gtk)/ {s:adtxt:at:; s:adgtk:ag:}" \
boot$N/isolinux/desktop/menu.cfg
sed -i "/menu begin advanced/ s:ced:ced-%desktop%:
/Advanced options/ i\ menu label Advanced options
@ -49,8 +46,7 @@ make_desktop_template() {
s:include menu:include %desktop%/prmenu:" \
boot$N/isolinux/desktop/prompt.cfg
for file in boot$N/isolinux/*txt.cfg boot$N/isolinux/*gtk.cfg \
boot$N/isolinux/*text.cfg; do
for file in boot$N/isolinux/*txt.cfg boot$N/isolinux/*gtk.cfg; do
[ -e "$file" ] || continue
# Skip rescue include files
if $(echo $file | grep -Eq "/(amd)?rq"); then
@ -63,9 +59,8 @@ make_desktop_template() {
dt_prfile="$(dirname "$file")/desktop/$(basename "$file")"
dt_file="${dt_prfile%.cfg}dt.cfg"
dt_file="$(echo "$dt_file" | \
sed -r "s:ad(amd)?te?xt:\1at:
s:ad(amd)?gtk:\1ag:
s:text:txt:")"
sed -r "s:adtxt:at:
s:adgtk:ag:")"
cp $file $dt_file
sed -ri "/^default/ s:^:#:
/include (amd)?rq/ d
@ -93,8 +88,7 @@ modify_for_light_desktop() {
# Cleanup
rm -r boot$N/isolinux/desktop
for file in boot$N/isolinux/*txt.cfg boot$N/isolinux/*gtk.cfg \
boot$N/isolinux/prompt.cfg \
boot$N/isolinux/*text.cfg; do
boot$N/isolinux/prompt.cfg; do
[ -e "$file" ] || continue
# Skip rescue include files
if $(echo $file | grep -q "/rq"); then