Browse Source

* Joey Hess

- Fix use of test programs to mark a task to be installed by default.
      Only done for --new-install though. Closes: #274933
    - To allow tasks with such test programs to co-exist with preseeding
      (and not override preseeded values) use the seen flag to tell if
      tasksel/first is preseeded.
keep-around/43e990ab3f4cc50982f8dbc32e3465ca7c827876
Joey Hess 19 years ago
parent
commit
17d300cd7d
  1. 6
      debian/changelog
  2. 14
      tasksel-debconf
  3. 15
      tasksel.pl

6
debian/changelog

@ -1,5 +1,11 @@
tasksel (2.13) UNRELEASED; urgency=low
* Joey Hess
- Fix use of test programs to mark a task to be installed by default.
Only done for --new-install though. Closes: #274933
- To allow tasks with such test programs to co-exist with preseeding
(and not override preseeded values) use the seen flag to tell if
tasksel/first is preseeded.
* Translations
- Stefano Canepa
- Italian updated (debian/po). Closes: #270123

14
tasksel-debconf

@ -2,15 +2,27 @@
# because debconf sucks
. /usr/share/debconf/confmodule
set -e
tmpfile=$1
choices="$2"
defaults="$3"
question=$4
db_settitle tasksel/title
db_subst $question CHOICES "$choices"
if [ "x$defaults" != "x-" ]; then
# Allow tasksel/first to be preseeded. If it's marked as seen, then
# it must have been preseeded, and that overrides any defaults set by
# tasksel.
if [ "$question" = "tasksel/first" ]; then
db_fget $question seen
if [ "$RET" = false ]; then
db_set $question "$defaults"
fi
else
db_set $question "$defaults"
fi
db_input high $question || true
db_go || true
db_fset $question seen false

15
tasksel.pl

@ -59,7 +59,7 @@ sub read_task_desc {
}
}
else {
print STDERR "parse error on line $. on $desc\n";
print STDERR "parse error in stanza $. of $desc\n";
}
}
if (%data) {
@ -235,6 +235,7 @@ sub task_test {
}
}
}
return $task;
}
@ -396,15 +397,17 @@ sub main {
my @list = order_for_display(grep { $_->{_display} == 1 } @tasks);
if (@list && ! $options{"no-ui"} && ! $options{install} && ! $options{remove}) {
if (! $options{"new-install"}) {
# find tasks that are already installed
# Find tasks that are already installed.
map { $_->{_installed} = task_installed($_) } @list;
# Don't install new tasks unless manually selected.
map { $_->{_install} = 0 } @list;
}
else {
# assume that no tasks are installed, to ensure
# that complete tasks get installed on new installs
# Assume that no tasks are installed, to ensure
# that complete tasks get installed on new
# installs.
map { $_->{_installed} = 0 } @list;
}
map { $_->{_install} = 0 } @list; # don't install displayed tasks unless selected
my $question="tasksel/tasks";
if ($options{"new-install"}) {
$question="tasksel/first";
@ -413,7 +416,7 @@ sub main {
my $tmpfile=`tempfile`;
chomp $tmpfile;
system($debconf_helper, $tmpfile, task_to_debconf(@list),
($options{"new-install"} ? "-" : task_to_debconf(@default)),
task_to_debconf(@default),
$question);
open(IN, "<$tmpfile");
my $ret=<IN>;

Loading…
Cancel
Save