Browse Source

* Joey Hess

- Add --list-tasks switch.
    - Document --new-install and long format switches.
tags/2.07
Joey Hess 17 years ago
parent
commit
23f131acdc
3 changed files with 32 additions and 11 deletions
  1. +3
    -0
      debian/changelog
  2. +14
    -6
      tasksel.pl
  3. +15
    -5
      tasksel.pod

+ 3
- 0
debian/changelog View File

@@ -1,5 +1,8 @@
tasksel (2.07) UNRELEASED; urgency=low

* Joey Hess
- Add --list-tasks switch.
- Document --new-install and long format switches.
* Translations
- Kęstutis Biliūnas
- Updated Lithuanian translation of tasks.


+ 14
- 6
tasksel.pl View File

@@ -188,7 +188,7 @@ sub getopts {
my %ret;
Getopt::Long::Configure ("bundling");
if (! GetOptions(\%ret, "test|t", "required|r", "important|i",
"standard|s", "no-ui|n", "new-install")) {
"standard|s", "no-ui|n", "new-install", "list-tasks")) {
usage();
exit(1);
}
@@ -199,17 +199,20 @@ sub usage {
print STDERR gettext(q{Usage:
tasksel install <task>
tasksel [options]; where options is any combination of:
-t -- test mode; don't really do anything
-r -- install all required-priority packages
-i -- install all important-priority packages
-s -- install all standard-priority packages
-n -- don't show UI; use with -r or -i usually
-t, --test test mode; don't really do anything
-r, --required install all required-priority packages
-i, --important install all important-priority packages
-s, --standard install all standard-priority packages
-n, --no-ui don't show UI; use with -r or -i usually
--new-install atomatically install some tasks
--list-tasks list tasks that would be displayed and exit
});
}

my @aptitude_install;
my @tasks_to_install;
my %options=getopts();

if (@ARGV) {
if ($ARGV[0] eq "install") {
shift;
@@ -225,6 +228,11 @@ my @tasks=map { hide_dependent_tasks($_) } map { task_test($_) }
grep { task_avail($_) } map { read_task_desc($_) }
list_task_descs();

if ($options{"list-tasks"}) {
print $_->{task}."\n" foreach grep { $_->{_display} } @tasks;
exit(0);
}

if (! $options{"new-install"}) {
# Don't install hidden tasks if this is not a new install.
map { $_->{_install} = 0 } grep { $_->{_display} == 0 } @tasks;


+ 15
- 5
tasksel.pod View File

@@ -17,26 +17,36 @@ ones to install

=over 4

=item B<-t>
=item B<-t>, B<--test>

test mode; don't actually run apt-get on exit

=item B<-r>
=item B<-r>, B<--required>

install all required-priority packages

=item B<-i>
=item B<-i>, B<--important>

install all important-priority packages

=item B<-s>
=item B<-s>, B<--standard>

install all standard-priority packages

=item B<-n>
=item B<-n>, B<--no-ui>

don't show UI; use with -r or -i usually

=item B<--new-install>

automatically select some tasks without even displaying them to the user;
used during new Debian installs.

=item B<--list-tasks>

list on stdout the tasks that would be displayed in the tasksel intserface,
and exit

=back

=head1 SEE ALSO


Loading…
Cancel
Save