Browse Source

- Patch from Denis to always use untranslated values in the debconf

choices list of tasks, as used for preseeding. Closes: #278186
keep-around/43e990ab3f4cc50982f8dbc32e3465ca7c827876
Joey Hess 18 years ago
parent
commit
0c213c977b
  1. 2
      debian/changelog
  2. 1
      debian/rules
  3. 8
      tasksel-debconf
  4. 12
      tasksel.pl

2
debian/changelog

@ -5,6 +5,8 @@ tasksel (2.19) UNRELEASED; urgency=low
- Add missing languages in Makefile. Closes: #286539
* Joey Hess
- Don't require whitespace after keys with multiline values. Closes: #286054
- Patch from Denis to always use untranslated values in the debconf
choices list of tasks, as used for preseeding. Closes: #278186
* Translations
- Bosnian translation updates by Safir Secerovic

1
debian/rules

@ -51,6 +51,7 @@ binary-indep: build install
dh_strip
dh_compress
dh_installdebconf
perl -pi -e 's/^Choices: \$${CHOICES}/Choices: \$${ORIGCHOICES}/' debian/tasksel/DEBIAN/templates
dh_fixperms
dh_installdeb
dh_shlibdeps

8
tasksel-debconf

@ -5,11 +5,13 @@ set -e
tmpfile=$1
choices="$2"
defaults="$3"
question=$4
choicestrans="$3"
defaults="$4"
question=$5
db_settitle tasksel/title
db_subst $question CHOICES "$choices"
db_subst $question ORIGCHOICES "$choices"
db_subst $question CHOICES "$choicestrans"
# 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

12
tasksel.pl

@ -64,7 +64,8 @@ sub read_task_desc {
}
if (%data) {
$data{relevance}=5 unless exists $data{relevance};
$data{shortdesc}=dgettext("debian-tasks", $data{description}->[0]);
$data{shortdesc}=$data{description}->[0];
$data{shortdesctrans}=dgettext("debian-tasks", $data{shortdesc});
push @ret, \%data;
}
}
@ -252,8 +253,9 @@ sub hide_dependent_tasks {
# Converts a list of tasks into a debconf list of their short descriptions.
sub task_to_debconf {
my $field = shift;
join ", ", map {
my $desc=$_->{shortdesc};
my $desc=$_->{$field};
if ($desc=~/, /) {
warning("task ".$_->{task}." contains a comma in its short description: \"$desc\"");
}
@ -415,8 +417,10 @@ sub main {
my @default = grep { $_->{_display} == 1 && ($_->{_install} == 1 || $_->{_installed} == 1) } @tasks;
my $tmpfile=`tempfile`;
chomp $tmpfile;
system($debconf_helper, $tmpfile, task_to_debconf(@list),
task_to_debconf(@default),
system($debconf_helper, $tmpfile,
task_to_debconf("shortdesc", @list),
task_to_debconf("shortdesctrans", @list),
task_to_debconf("shortdesc", @default),
$question);
open(IN, "<$tmpfile");
my $ret=<IN>;

Loading…
Cancel
Save