adapt desktop handling for tasksel/d-i changes

tasksel now allows selecting the desktop, and d-i has dropped the boot
menu desktop selection, so we no longer need to have desktop boot
menus on CDs.

CD images for specific desktops (xfce/kde/mate/etc) should still
override the default tasksel desktop.
This commit is contained in:
Joey Hess 2014-09-26 21:14:33 +01:00 committed by Steve McIntyre
parent 28d2a67dcf
commit b494adcb03
4 changed files with 8 additions and 122 deletions

3
debian/changelog vendored
View File

@ -14,6 +14,9 @@ debian-cd (3.1.16) UNRELEASED; urgency=medium
* Fix word-splitting regexp in generate_di_list. Closes: #758512. * Fix word-splitting regexp in generate_di_list. Closes: #758512.
* Improve correctstatus speed. Closes: #759343 * Improve correctstatus speed. Closes: #759343
[ Joey Hess ]
* adapt desktop handling for tasksel/d-i changes. Closes: #762487
-- Steve McIntyre <93sam@debian.org> Thu, 07 Aug 2014 01:45:01 +0100 -- Steve McIntyre <93sam@debian.org> Thu, 07 Aug 2014 01:45:01 +0100
debian-cd (3.1.15) unstable; urgency=medium debian-cd (3.1.15) unstable; urgency=medium

View File

@ -150,19 +150,16 @@ extra_image () {
done done
} }
# If multiple desktops are to be supported, set the default one
ORIG_DESKTOP=
case "$DESKTOP" in case "$DESKTOP" in
$UNSPEC_DESKTOP_DEFAULT) $UNSPEC_DESKTOP_DEFAULT)
# default from tasksel # default from tasksel
DESKTOP= DESKTOP=
;; ;;
all) all)
ORIG_DESKTOP=$DESKTOP # default from tasksel
DESKTOP= DESKTOP=
;; ;;
light) light)
ORIG_DESKTOP=$DESKTOP
DESKTOP=xfce DESKTOP=xfce
;; ;;
esac esac
@ -377,14 +374,7 @@ if [ -n "$KERNEL_PARAMS" ]; then
done done
fi fi
case "$ORIG_DESKTOP" in set_default_desktop
all)
modify_for_all_desktop ;;
light)
modify_for_light_desktop ;;
*)
modify_for_single_desktop ;;
esac
# Add autorun # Add autorun
if [ -f boot$N/setup.exe ]; then if [ -f boot$N/setup.exe ]; then

View File

@ -27,8 +27,8 @@ UNSPEC_DESKTOP_DEFAULT="$($BASEDIR/tools/apt-selection cache depends task-deskto
exit exit
}')" }')"
# Only i386 and amd64 support desktop selection with the 'light' and 'all' # Only i386 and amd64 use DESKTOP to set the default desktop;
# desktops; make sure other arches get a working config # make sure other arches get a working config
if [ "$ARCH" != i386 ] && [ "$ARCH" != amd64 ]; then if [ "$ARCH" != i386 ] && [ "$ARCH" != amd64 ]; then
if [ "$DESKTOP" = all ] || [ "$DESKTOP" = "$UNSPEC_DESKTOP_DEFAULT" ] ; then if [ "$DESKTOP" = all ] || [ "$DESKTOP" = "$UNSPEC_DESKTOP_DEFAULT" ] ; then
DESKTOP= DESKTOP=

View File

@ -26,10 +26,6 @@ multiarch_workaround() {
boot$N/isolinux/amdtxt.cfg || true boot$N/isolinux/amdtxt.cfg || true
sed -i "/^include menu.cfg/ a\include instsel.cfg" \ sed -i "/^include menu.cfg/ a\include instsel.cfg" \
boot$N/isolinux/prompt.cfg boot$N/isolinux/prompt.cfg
if [ -e boot$N/isolinux/desktop/prompt.cfg ]; then
sed -i "/^default install/ a\include instsel.cfg" \
boot$N/isolinux/desktop/prompt.cfg
fi
cat >boot$N/isolinux/instsel.cfg <<EOF cat >boot$N/isolinux/instsel.cfg <<EOF
default install-select default install-select
label install-select label install-select
@ -38,26 +34,7 @@ label install-select
EOF EOF
} }
create_desktop_dir() { set_default_desktop() {
local desktop=$1 title
case $desktop in
kde) title=KDE ;;
xfce) title=Xfce ;;
lxde) title=LXDE ;;
gnome) title=Gnome ;;
esac
cp -r boot$N/isolinux/desktop boot$N/isolinux/$desktop
sed -i "s:%desktop%:$desktop:
s:%dt-name%:$title:" boot$N/isolinux/$desktop/*.cfg
}
modify_for_single_desktop() {
# Cleanup
rm -f boot$N/isolinux/dtmenu.cfg
rm -fr boot$N/isolinux/desktop
# Set default desktop, or remove if not applicable # Set default desktop, or remove if not applicable
if [ "$DESKTOP" ]; then if [ "$DESKTOP" ]; then
sed -i "s:%desktop%:$DESKTOP:g" boot$N/isolinux/*.cfg sed -i "s:%desktop%:$DESKTOP:g" boot$N/isolinux/*.cfg
@ -65,87 +42,3 @@ modify_for_single_desktop() {
sed -i "s/desktop=%desktop% //" boot$N/isolinux/*.cfg sed -i "s/desktop=%desktop% //" boot$N/isolinux/*.cfg
fi fi
} }
modify_for_light_desktop() {
local desktop
for file in boot$N/isolinux/{,amd}{,ad}{txt,gtk}.cfg; do
if [ -e $file ]; then
mv $file boot$N/isolinux/desktop
fi
done
sed -i "s/desktop=%desktop% //" boot$N/isolinux/*.cfg
for desktop in xfce lxde; do
create_desktop_dir $desktop
done
# Cleanup
rm -r boot$N/isolinux/desktop
rm boot$N/isolinux/prompt.cfg boot$N/isolinux/dtmenu.cfg
# Create new "top level" menu file
cat >boot$N/isolinux/menu.cfg <<EOF
menu hshift 13
menu width 49
include stdmenu.cfg
menu title Desktop environment menu
menu begin lxde-desktop
include stdmenu.cfg
menu label ^LXDE
menu title LXDE desktop boot menu
text help
Select the 'Lightweight X11 Desktop Environment' for the Desktop task
endtext
label mainmenu-lxde
menu label ^Back..
menu exit
include lxde/menu.cfg
menu end
menu begin xfce-desktop
include stdmenu.cfg
menu label ^Xfce
menu title Xfce desktop boot menu
text help
Select the 'Xfce lightweight desktop environment' for the Desktop task
endtext
label mainmenu-xfce
menu label ^Back..
menu exit
include xfce/menu.cfg
menu end
menu begin rescue
include stdmenu.cfg
menu label ^System rescue
menu title System rescue boot menu
label mainmenu-rescue
menu label ^Back..
menu exit
include rqtxt.cfg
include amdrqtxt.cfg
include rqgtk.cfg
include amdrqgtk.cfg
menu end
EOF
}
modify_for_all_desktop() {
local desktop
for file in boot$N/isolinux/{,amd}{,ad}{txt,gtk}.cfg; do
if [ -e $file ]; then
cp $file boot$N/isolinux/desktop
fi
done
sed -i "s/desktop=%desktop% //" boot$N/isolinux/*.cfg
for desktop in kde xfce lxde gnome; do
if [ $desktop != $UNSPEC_DESKTOP_DEFAULT ] ; then
create_desktop_dir $desktop
fi
done
# Cleanup
rm -r boot$N/isolinux/desktop
}