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.
tags/2.38
Joey Hess 15 years ago
parent
commit
233b9f80b5
3 changed files with 18 additions and 6 deletions
  1. +8
    -2
      debian/changelog
  2. +1
    -1
      tasksel-debconf
  3. +9
    -3
      tasksel.pl

+ 8
- 2
debian/changelog View File

@@ -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



+ 1
- 1
tasksel-debconf View File

@@ -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

+ 9
- 3
tasksel.pl View File

@@ -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