summaryrefslogtreecommitdiff
path: root/Master/tlpkg/dev/dev.usermode-tlmgr.README
blob: 9f1ae445d7737e7798fb07a49c84dab5228b6ec1 (plain)
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
Using the TeX Live Manager in Usermode
======================================
(to be discussed and implemented)
(partial implementation working for install and remove is in
 tlpkg/dev/dev.usermode-tlmgr.patch)


0. Contents
-----------

0. Contents
1. Rational and definition
2. General layout
3. Description of actions
4. Open questions
5. Changes to the infrastructure

---------------------------------------------------------------

0.1 Implementation notes
------------------------

- User has to first call
	tlmgr init-usertree [ --usertree .... ]
- available_architectures is set to the empty list, this allows
  updating packages depending on .ARCH packages, but I am not sure
  if that is a good idea
  fixed now, only relocated packages can be installed in usermode
- update, install, remove, paper done
- postinstall action call -sys variant if !$opts{"usermode"}
- most other actions exit 1 with warning if in usermode

---------------------------------------------------------------

1. Rationale and definition
---------------------------

The idea behind developing a user mode for the TeX Live Manager is
providing a tool to manage different texmf trees for users without
write permissions to the system TeX Live installation on a multi user
system.

If a user without write permissions to the main installation
tree is calling tlmgr, or it is called with --user (name to be decided)
command line argument, then tlmgr will work in "usermode" and will behave
as specified here.

Already supported actions (where no write permissions are needed):
	help, version, search, show, list, check, print-arch

Actions that behave differently in usermode:
	install, update, remove, option, paper, generate, backup, restore
	uninstall, symlinks

Actions that are not supported in usermode:
	arch

Actions I am not sure by now
	gui

------------------------------------------------------------

2. General layout
-----------------

In usermode tlmgr manages a different texmf tree. By default it is TEXMFHOME
but can be changed with --user-tree ... (name to be decided) (which implies
automatically --user). The so managed texmf tree TREE contains a new toplevel
directory 
	TREE/tlpkg
which in turns contains the tlpdb, and the sub directory tlpkg/tlpobj.

The file
	TREE/tlpkg/texlive.tlpdb
contains only the packages that have been installed into the user tree TREE
plus additional options in the virtual package 00texlive.installation
(like with the main installation's texlive.tlpdb).

Management in user mode is only possible for "relocatable" packages, that are
packages that share the common prefix
	$TeXLive::TLConfig::RelocPrefix
which is set to
	texmf-dist
That means that only a package where all files are from the texmf-dist tree
can be managed in usermode.

These packages' containers are created relocatable, that is, the files in
the tar file do not have the "texmf-dist" part included, thus can be
unpacked directly into TEXMFHOME. In the tlpdb this fact is advertised
in a TLPOBJ with the new field
	relocated 1
As an example:
	name 12many
	category Package
	revision ...
	relocated 1
	shortdesc ...
	...
	docfiles size=98
	 RELOC/doc/latex/12many/12many.pdf
	 RELOC/doc/latex/12many/README
	...
	srcfiles size=6
	 RELOC/source/latex/12many/12many.dtx
	 RELOC/source/latex/12many/12many.ins
	runfiles size=1
	 RELOC/tex/latex/12many/12many.sty
	...

The normal installation procedure of TeX Live (i.e., currently
TLUtils::install_package) will take care that when unpacking these
relocated containers the missing "texmf-dist" is added.

-----------------------------------------------

3. Description of actions
-------------------------

install:
  in usermode the tlmgr action install will check that the package
  and all depending packages are either all relocated, or those that
  are not relocated are already installed in the system installation.
  If this is true it will unpack all containers to be installed into
  the user tree (TEXMFHOME or the value of --user-tree) and add the
  respective packages to the user texlive.tlpdb (creating it if there
  has non be created till now).

  Open question: Should we support installation of dependencies at all
  or should install only work on single package in user mode. If only
  on single package, what to do with collections and other dependencies?
  Maybe the user has to install all packages by hand?

  Currently installing a collection installs all depending packages,
  but in contrast to normal mode does not install depending collections.
  So in *normal* mode tlmgr install collection-context would install
  collection-metapost, c-basic, c-documentation-base, too. In *usermode*
  only the packages mentioned in collection-context are installed.

backup, restore, remove, update:
  in usermode the tlmgr action update will check that all packages
  to be updated are installed in the user tree, otherwise it behaves
  exactely like the system tlmgr.
 
option:
  only acts upon the user's texlive.tlpdb

paper:
  changes configuration files in user tree

generate:
  creates configuration files in user tree

uninstall:
  will remove all packages from the user's texlive.tlpdb, and then
  remove the tlpkg directory in the user tree

symlinks:
  takes the settings from the user's texlive.tlpdb, other then that
  it behaves the same way

gui:
  the GUI should be adapted to do (at least):
  - if in usermode show all packages with specification whether it is
    from user tree or system tree
  - show packags that have versions in the user tree and the system tree
  - other actions work as described above

arch:
  is simply not supported because it needs access to the binary directories
  which are not in the texmf-dist prefix, so no operation is allowed

-----------------------------------------------------------------------

4. Open questions
-----------------

a. Post install actions:
   what should be done with post install actions:
   - fileassoc -> ignore
   - shortcuts -> make them only for the user?
   - TLPackageConfigurations (should it go anyway) ?
   - post install code scripts: we could pass the "user" argument
     so scripts can react on that

b. Behaviour if system tree has been updated and provides newer packages:
   - warn the user
   - automatically remove packages in the user tree that are older NO!!!

c. Currently user mode is only when installing from CD/NET, but not
   from svn/DVD. Should this be fixed?

--------------------------------------------------------------------------

5. Changes to the infrastructure (those already known)
--------------------------------

- texlive.tlpdb:
  entries can now files without any leading texmf tree, but then the
  package has to contain the "relocated 1" key/value pair
- TLPOBJ.pm: accept new key "relocated"
- tl-update-container: 
  . add cmd line option for $opt_relative
  . adjust the tlpobj if the container was build relocatable so that
    texmf-dist prefix is removed from the files
- TLUtils.pm
  install_package(s): check for relocatable and adjust $target by
    adding $RelocPrefix
- tlmgr.pl
  too many to actually list them

---------------------------------------------------------------------------
np, last changed 2009-05-02