File: DESIGN.txt

package info (click to toggle)
common-lisp-controller 7.6
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 308 kB
  • ctags: 23
  • sloc: sh: 332; lisp: 191; makefile: 40
file content (81 lines) | stat: -rw-r--r-- 2,896 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
; Copyright (C) 2000,2009  Peter Van Eynde and Kevin M. Rosenberg
; Licensed under the LLGPL, see debian/copyright file

This is the general design of the new 'light weight' common-lisp-controller v7.

Common Lisp Libraries:

 Libraries should:
 - use adsf
 - install their source packages in /usr/share/common-lisp/source/<library>
 - install a symlink to their asdf package from /usr/share/common-lisp/systems/<library>.asd to
   /usr/share/common-lisp/source/<library>/<library>.asd
 - after install call "/usr/sbin/register-common-lisp-source <library>"
 - before removal of the package call "/usr/sbin/unregister-common-lisp-source <library>"

Common Lisp Implementations::

 Implementations should:
 - install a script /usr/lib/common-lisp/bin/<impl>.sh that has the following 
   commands:
  /usr/lib/common-lisp/bin/<impl>.sh install-clc
   This should load /usr/share/common-lisp/source/common-lisp-controller/common-lisp-controller.lisp
   then call
(common-lisp-controller:init-common-lisp-controller-v4 "<name of implementation>")
   and then save the resulting image as default for the system for implementations that do
   not support a 'dump the current running image as new image' there is a v5 interface. See the 
   ecl implementation for an example.
 - after install call "/usr/sbin/register-common-lisp-implementation <implementation>"
 - before removal call "/usr/sbin/unregister-common-lisp-implementation <implementation>"
 - should load /etc/lisp-config.lisp on startup.

There are 2 scenarious:

- a user wants to use a system-wide library.
  (clc:clc-require :<library>)
  will load the system at
  /usr/share/common-lisp/systems/<library>.asd
  that will use the source at 
  /usr/share/common-lisp/source/<library>
  fasls will be placed in 
  /var/cache/common-lisp-controller/<userid>/<implementation>/<library>/
- a user wants to use another library. He or she used adsf-install
and the sources got placed in ~/.sbcl or ~/sdf-install-dir/. We do not interfere
with this use as we expect the user to be able to correct all errors :-).

User interface:

To load a library "cil" do:
(clc:clc-require :cil)

To recompile all libraries, dropping into the 
debugger on error, do:
(clc:clc-build-all-packages)
to do so while ignoring build errors,
do:
(clc:clc-build-all-packages t)

To add user packages, use clc-register-user-package. This will
place a link to the user's asdf file in ~/.clc/systems.

Technical Implementation:

- register-common-lisp-source:
does nothing

- unregister-common-lisp-source:
does: (after checking stuff):
rm -rf /var/cache/common-lisp-controller/*/*/<library>

- register-common-lisp-implementation
does nothing

- unregister-common-lisp-implementation
does: (after checking stuff):
rm -rf /var/cache/common-lisp-controller/*/<implementation>

- clc-init.lisp:

loads adsf
builds pathname translations for /usr/share/common-lisp/source/