Browse Source

- Add --task-desc switch. Closes: #259664

tags/2.07
Joey Hess 17 years ago
parent
commit
79d5833e00
3 changed files with 19 additions and 1 deletions
  1. +1
    -0
      debian/changelog
  2. +14
    -1
      tasksel.pl
  3. +4
    -0
      tasksel.pod

+ 1
- 0
debian/changelog View File

@@ -4,6 +4,7 @@ tasksel (2.07) UNRELEASED; urgency=low
- Add --list-tasks switch.
- Document --new-install and long format switches.
- Add --task-packages switch, may be used by Synaptic.
- Add --task-desc switch. Closes: #259664
* Translations
- Kęstutis Biliūnas
- Updated Lithuanian translation of tasks.


+ 14
- 1
tasksel.pl View File

@@ -207,7 +207,7 @@ sub getopts {
Getopt::Long::Configure ("bundling");
if (! GetOptions(\%ret, "test|t", "required|r", "important|i",
"standard|s", "no-ui|n", "new-install", "list-tasks",
"task-packages=s@")) {
"task-packages=s@", "task-desc=s")) {
usage();
exit(1);
}
@@ -226,6 +226,7 @@ tasksel [options]; where options is any combination of:
--new-install atomatically install some tasks
--list-tasks list tasks that would be displayed and exit
--task-packages list available packages in a task
--task-desc returns the description of a task
});
}

@@ -250,6 +251,18 @@ if (exists $options{"task-packages"}) {
}
exit(0);
}
elsif ($options{"task-desc"}) {
my $task=(grep { $_->{task} eq $options{"task-desc"} }
map { read_task_desc($_) } list_task_descs())[0];
if ($task) {
print dgettext("debian-tasks", join(" ",
@{$task->{description}}[1..$#{$task->{description}}]))."\n";
exit(0);
}
else {
exit(1);
}
}

my @tasks=map { hide_dependent_tasks($_) } map { task_test($_) }
grep { task_avail($_) } map { read_task_desc($_) }


+ 4
- 0
tasksel.pod View File

@@ -52,6 +52,10 @@ lists on stdout the packages that are available and part of the given task

Note that this option may be given more than once.

=item B<--task-desc> task

outputs the extended description of the given task

=back

=head1 SEE ALSO


Loading…
Cancel
Save