/[d-i]/trunk/doc/apt-install.txt
ViewVC logotype

Contents of /trunk/doc/apt-install.txt

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1981 - (show annotations) (download)
Fri Feb 21 18:42:02 2003 UTC (10 years, 3 months ago) by pere
File MIME type: text/plain
File size: 2731 byte(s)
It was decided on IRC today that the apt-install design is ok for now.
1 Installing extra packages into /target/
2 =======================================
3
4 The udeb packages can request extra packages to be installed into
5 /target/. One way to use this is for grub-installer to request the
6 grub package to be installed, making it easier to set up the grub boot
7 loader.
8
9 The packages will be queued for installation until base-installer is
10 executed. At this point, the queued packages will be installed, and
11 any requests for extra packages will be executed immediately.
12
13 The idea is to make it possible to request packages before
14 base-installer is installed, and at any point before prebaseconfig is
15 executed. When /target/ or /cdrom/ is umounted by prebaseconfig, it
16 is to late to install extra packages.
17
18 Usage
19 -----
20
21 The postinst or prebaseconfig.d script for packages call a script to
22 queue or install a package.
23
24 apt-install <package>
25
26 This script have the following return values:
27
28 0 The package is installed, or was successfully installed into /target/
29 1 The package is now queued for installation
30 2 The package failed to install into /target/ (it was missing, or
31 something else was wrong).
32
33 Packages just requesting an extra package, can ignore the return value:
34
35 apt-install <package> || true
36
37 Packages with postinst script that need to use the installed package
38 right now, will need to check the return value before doing this:
39
40 if apt-install <package> ; then
41 # do stuff
42 else
43 echo "error: Unable to do stuff"
44 exit 1
45 fi
46
47 Implementation
48 --------------
49
50 The script will check if base-installer was successfully completed,
51 and in this case will run 'apt-get install' try to fetch and install
52 the packages. If base-installer isn't completed, it will add the
53 package name to /var/lib/apt-install/queue.
54
55 To make sure apt-install is available as early as possible, the script
56 is included in the rootskel package.
57
58 At the end of the base-installer postinst script, it will check this
59 file and install the packages listed in the file, something like this:
60
61 for pkg in `cat /var/lib/apt-install/queue` do
62 apt-install "$pkg" || true
63 done
64
65 Files
66 -----
67
68 /bin/apt-install - request a package installed into /target/
69 /var/lib/apt-install/queue - package queue, installed by base-installer
70 /target/etc/apt/sources.list - file created when base-installer completes
71
72 Comments
73 --------
74
75 The udeb kernel-installer can be changed to call 'apt-install
76 <kernel>' instead of installing the package manually.
77
78 The lilo and grub package can call 'apt-install {lilo|grub}' before
79 they start to use the grub or lilo programs in /target/.
80
81 The brltty-udeb package can call 'apt-install brltty' in its postinst
82 and make sure also brltty is installed into /target/.

  ViewVC Help
Powered by ViewVC 1.1.5