Browse Source

* Support backing up from tasksel if it is run as part of a larger

debconf-using program such as d-i; while tasksel will not enable the
  backup capb itself, if it is enabled and the user chooses to back up, it
  will exit with code 10. Note that this code, rather than 30, was chosen
  to interoperate with d-i, which rather inexplicably uses 10 instead of 30
  to signal backup across process boundries.
keep-around/43e990ab3f4cc50982f8dbc32e3465ca7c827876
Joey Hess 17 years ago
parent
commit
233b9f80b5
  1. 10
      debian/changelog
  2. 2
      tasksel-debconf
  3. 12
      tasksel.pl

10
debian/changelog

@ -23,8 +23,14 @@ tasksel (2.38) UNRELEASED; urgency=low
incremental progress displays being logged to stderr, since eg in d-i that
results in a lot (possibly many megabytes) of download progress info in
the logs.
-- Joey Hess <joeyh@debian.org> Sun, 25 Dec 2005 16:45:55 -0500
* Support backing up from tasksel if it is run as part of a larger
debconf-using program such as d-i; while tasksel will not enable the
backup capb itself, if it is enabled and the user chooses to back up, it
will exit with code 10. Note that this code, rather than 30, was chosen
to interoperate with d-i, which rather inexplicably uses 10 instead of 30
to signal backup across process boundries.
-- Joey Hess <joeyh@debian.org> Sun, 25 Dec 2005 17:14:36 -0500
tasksel (2.37) unstable; urgency=low

2
tasksel-debconf

@ -26,7 +26,7 @@ else
fi
db_input high $question || true
db_go || true
db_go # note: intentionally unguarded
db_fset $question seen false
db_get $question
echo "$RET" >$tmpfile

12
tasksel.pl

@ -440,13 +440,19 @@ sub main {
my @default = grep { $_->{_display} == 1 && ($_->{_install} == 1 || $_->{_installed} == 1) } @tasks;
my $tmpfile=`tempfile`;
chomp $tmpfile;
system($debconf_helper, $tmpfile,
my $ret=system($debconf_helper, $tmpfile,
task_to_debconf("shortdesc", @list),
task_to_debconf("shortdesctrans", @list),
task_to_debconf("shortdesc", @default),
$question);
$question) >> 8;
if ($ret == 30) {
exit 10; # back up
}
elsif ($ret != 0) {
error "debconf failed to run";
}
open(IN, "<$tmpfile");
my $ret=<IN>;
$ret=<IN>;
if (! defined $ret) {
die "tasksel canceled\n";
}

Loading…
Cancel
Save