Attached patch works, for post-squeeze application. -- see shy jo
From 6a3b4d36717919d6a5cbdf67f9d5ebb293cd7a5d Mon Sep 17 00:00:00 2001 From: Joey Hess <j...@kitenet.net> Date: Mon, 6 Dec 2010 16:44:22 -0400 Subject: [PATCH] make tasksel install $foo-desktop not pull in gnome-desktop
--- debian/templates | 2 +- tasksel.pl | 6 +++++- tests/preferred-desktop | 12 +++++++++++- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/debian/templates b/debian/templates index 9c3fcaf..f2c150d 100644 --- a/debian/templates +++ b/debian/templates @@ -17,7 +17,7 @@ _Description: Choose software to install: Template: tasksel/desktop Type: multiselect -Choices: gnome, kde, xfce +Choices: gnome, kde, xfce, lxde Default: gnome Description: The desktop environment to install when the desktop task is selected This can be preseeded to change the default. diff --git a/tasksel.pl b/tasksel.pl index dbc57f8..885c96e 100755 --- a/tasksel.pl +++ b/tasksel.pl @@ -540,7 +540,11 @@ sub main { # dependencies are met and their test fields # mark them for install. if (! exists $tested{$task->{task}}) { - $ENV{TESTING_ENHANCER}=1; + $ENV{TESTING_ENHANCER}=join(" ", + map { $_->{task} } + grep { $_->{_install} && exists $_->{enhances} && length $_->{enhances} } + @tasks + ); task_test($task, $options{"new-install"}, 0, 1); delete $ENV{TESTING_ENHANCER}; $tested{$task->{task}}=$task->{_install}; diff --git a/tests/preferred-desktop b/tests/preferred-desktop index f3d14fb..f729d46 100755 --- a/tests/preferred-desktop +++ b/tests/preferred-desktop @@ -5,13 +5,23 @@ set -e # Avoid starting debconf if not being used to test which enhancing task to # install. -if [ ! "$TESTING_ENHANCER" ]; then +if [ -z "$TESTING_ENHANCER" ]; then exit 1 fi . /usr/share/debconf/confmodule if db_get "tasksel/desktop" && echo "$RET" | grep -q "$2"; then + # Avoid selecting a desktop environment if another is already + # going to be installed (perhaps it was selected at the command + # line). + if db_metaget "tasksel/desktop" Choices; then + for desktop in $RET; do + if echo " $TESTING_ENHANCER " | grep -q " $desktop-desktop "; then + exit 1 + fi + done + fi exit 0 else exit 1 -- 1.7.2.3
signature.asc
Description: Digital signature