~ubuntu-branches/ubuntu/maverick/tasksel/maverick

2 by Joey Hess
* Joey Hess
1
The interface uses debconf for consistency with the rest of the Debian
2
installer.
3
4
On startup, the tasksel program will read all *.desc files in
5
/usr/share/tasksel/ for information about what tasks are available. The
6
tasks will be presented in a simple list selection screen with their short
7
descriptions.
1 by Joey Hess
Should fix issues with doincludes.pl failing on autobuilders that
8
3 by Joey Hess
* Christian Perrier
9
On exit, tasksel executes the appropriate command to install the selected
10
packages. If the -t option is given, then tasksel prints out the command
11
line to use to stdout instead. All other messages are printed to stderr.
1 by Joey Hess
Should fix issues with doincludes.pl failing on autobuilders that
12
5 by Joey Hess
In debconf test, also test for DEBCONF_READFD being set, to detect when
13
To get a new task added to Debian, please file a bug report on tasksel.
2 by Joey Hess
* Joey Hess
14
15
Debian derived distributions can add a new .desc file to
16
/usr/share/tasksel/ to add additional tasks, or modify/divert
17
debian-tasks.desc to remove tasks.
3 by Joey Hess
* Christian Perrier
18
19
The file format is a rfc-822 style stanza, with fields named Task, Section,
5 by Joey Hess
In debconf test, also test for DEBCONF_READFD being set, to detect when
20
Description (which should include an extended description), Key, Packages, 
7 by Joey Hess, Translations of tasks
* More description-fu. Closes: #368853
21
Enhances, Test- and Relevance fields. Here is an example:
3 by Joey Hess
* Christian Perrier
22
5 by Joey Hess
In debconf test, also test for DEBCONF_READFD being set, to detect when
23
Task: graphical-games
3 by Joey Hess
* Christian Perrier
24
Section: user
25
Relevance: 10
5 by Joey Hess
In debconf test, also test for DEBCONF_READFD being set, to detect when
26
Description: Graphical games
27
 This task provides a variety of graphical games. Old-school unix games are
28
 not included.
3 by Joey Hess
* Christian Perrier
29
Key:
5 by Joey Hess
In debconf test, also test for DEBCONF_READFD being set, to detect when
30
 x-window-system-core
31
Packages: list
32
 quake
33
 myst
34
 monkey-island
3 by Joey Hess
* Christian Perrier
35
36
The Key field lists packages that are essential to the task. If those
37
packages are not available, then the task will not be available either. It
38
need not list all the packages in the task, if some only serve to make it
7 by Joey Hess, Translations of tasks
* More description-fu. Closes: #368853
39
better when they are available.
3 by Joey Hess
* Christian Perrier
40
41
The Packages field tells how to get a complete list of packages that are in
5 by Joey Hess
In debconf test, also test for DEBCONF_READFD being set, to detect when
42
the task. In the example above, it uses the "list" method, which is defined
43
in /usr/lib/tasksel/packages/list. This simple method just lets you list
44
the packages you want to include in the task in the following lines.
7 by Joey Hess, Translations of tasks
* More description-fu. Closes: #368853
45
All Key packages will be also be selected for installation when a task is
46
installed.
5 by Joey Hess
In debconf test, also test for DEBCONF_READFD being set, to detect when
47
48
In Debian, we mostly use the "task-fields" method, which is built into
49
tasksel, and looks for Task fields in the control data of available
50
packages, that list the name of the task. Another available method is
51
"standard", which just installs all standard priority packages, and another
52
is "manual", which, as a special case, runs aptitude interactively to
53
select what to install.
4 by Joey Hess
* Joey Hess
54
55
It's also possible to define other methods, by adding programs to
5 by Joey Hess
In debconf test, also test for DEBCONF_READFD being set, to detect when
56
/usr/lib/tasksel/packages/. Then list the name of the program as the first
57
word of the task field, and it will be run and passed the name of the task as
58
its first parameter and any further lines of the task field as its other
59
parameters, and should output a list of packages in that task. The "list"
60
method described above is a simple example of such a program.
3 by Joey Hess
* Christian Perrier
61
62
There is support for automatically installing tasks based on test programs.
63
If a task has a Test-* field, then a program in /usr/lib/tasksel/tests/
64
will be run. For example Test-lang fields cause /usr/lib/tasksel/tests/lang
20 by Colin Watson
* Resynchronise with Debian. Remaining changes:
65
to be run. The test is passed first the name of the task, and then the
3 by Joey Hess
* Christian Perrier
66
contents of the field as parameters. The exit code of the test controls
67
what to do with the task:
68
69
0 - do not display, but do install task
70
1 - do not display task 
71
2 - display task, marked for installation
72
3 - display task, not marked for installation
73
74
One use of these tests is in automatically selecting a language task
75
appropriate for the user's locale, and hiding the rest. The lang test
76
handles this by comparing the value of the Test-lang field of a task with
77
the locale setting. Tests could also be used for things like automatically
78
installing hardware support tasks on systems with the right hardware.
79
7 by Joey Hess, Translations of tasks
* More description-fu. Closes: #368853
80
There is support for tasks that enhance other tasks. If a task has a
81
Enhances field, then it should only be installed if all the tasks
82
listed as in that field are installed. For example, a french-desktop task
83
enchances a system that has both the french and desktop tasks, and will be
84
automatically installed on such a system but not others. Such tasks are
85
hidden from the menu.
86
20 by Colin Watson
* Resynchronise with Debian. Remaining changes:
87
If two tasks both enhance the same task (ie, gnome-desktop and kde-desktop
88
enhancing desktop), but only one should be selected, this can be
89
accomplished by adding Test-* fields.
3 by Joey Hess
* Christian Perrier
90
91
If a task is important enough that it should go near the top of its
92
section, give it a relevance of 9 or 10. If a task is not likely to be
93
used, give it a relevance of 1. Default is 5.
7 by Joey Hess, Translations of tasks
* More description-fu. Closes: #368853
94
95
tasksel also supports preinst, postinst, prerm, and postrm scripts for
96
tasks. These are run before a task is installed, and after it is removed as
97
with the dpkg scripts. These scripts sould be installed in
98
/usr/lib/tasksel/info/, for example, /usr/lib/tasksel/info/desktop.preinst.
99
Currently they are passed no parameters, but this might change later. These
17 by Colin Watson
* Resynchronise with Debian. Remaining changes:
100
scripts should take care not to output anything to stdout. You are not
101
encouraged to use these scripts to install any packages, as in some
102
situations apt can hang prompting for a CD switch if run from one of these
103
scripts.