Use iface_cache.get_interface() rather than policy.get_interface() in several
[zeroinstall.git] / 0store.1
blobb105e1e15d1d1fd60fb487c62652fd2b231af818
1 .TH 0STORE 1 "2006" "Thomas Leonard" ""
2 .SH NAME
3 0store \- manage the implementation cache
5 .SH SYNOPSIS
7 .B 0store add
8 \fBDIGEST\fP \fBDIRECTORY\fP
10 .B 0store add
11 \fBDIGEST\fP \fBARCHIVE\fP [ \fBEXTRACT\fP ]
13 .B 0store copy
14 \fBDIRECTORY\fP [ \fBDIRECTORY\fP ]
16 .B 0store find
17 \fBDIGEST\fP
19 .B 0store list
21 .B 0store manifest
22 \fBDIRECTORY\fP [ \fBALGORITHM\fP ]
24 .B 0store verify
25 ( \fBDIGEST\fP | \fBDIRECTORY\fP )
27 .SH DESCRIPTION
28 .PP
29 0store provides access to the low-level implementation cache. Normally, the
30 cache is updated automatically using 0launch(1).
32 .SH ADD
33 .PP
34 To add a directory to the store (makes a copy):
36 .B 0store add sha1=XXX directory
38 .PP
39 To add an archive to the store:
41 .B 0store add sha1=XXX archive.tgz
43 .PP
44 To add a subdirectory of an archive to the store:
46 .B 0store add sha1=XXX archive.tgz subdir
48 .PP
49 The actual digest is calculated and compared to the given one. If they don't
50 match, the operation is rejected.
52 .SH COPY
53 .PP
54 To copy an implementation (a directory with a name in the form
55 "algorithm=value"), use the copy function. This is similar to performing
56 a normal recursive directory copy followed by a
57 .B 0store verify
58 to check that the name matches the contents. E.g.:
60 .B 0store copy ~someuser/.cache/0install.net/implementations/sha256=XXX
61 /var/cache/0install.net/implementations/
63 .SH FIND
64 .PP
65 To find the path of a stored item:
67 .B 0store find sha1=XXX
69 .SH LIST
71 .PP
72 See the list of implementation caches currently configured:
74 .B 0store list
76 To add directories to this list, add them to your 'implementation-dirs'
77 configuration file.
79 .SH MANIFEST
80 .PP
81 To generate the manifest for a directory structure:
83 .B 0store manifest DIRECTORY [ALGORITHM]
85 .PP
86 The manifest lists every file and directory in the tree, along with the
87 digest of each file, thus uniquely identifying that particular set of files.
88 After the manifest, the last line gives the digest of the manifest itself.
90 .PP
91 This value is needed when creating interface files. However, the 0publish
92 command will automatically calculate the required digest for you and add it
93 to an interface file. See the packager's guide on the Zero Install web site for
94 details.
95 .PP
96 Supported algorithms are 'sha1' (supported by all versions), 'sha1new'
97 (requires injector 0.20 or later) and 'sha256' (requires injector 0.20 or later
98 AND the Python hashlib module).
100 .SH VERIFY
102 To check that an item is stored correctly:
104 .B 0store verify /path/to/sha1=XXX
106 This calculates the manifest of the directory and checks that its digest matches
107 the directory's name. It also checks that it matches the digest of the .manifest
108 file inside the directory. If the .manifest doesn't correspond to the current
109 tree, it displays a list of the differences (in unified diff format).
111 .SH COMMAND-LINE OPTIONS
114 \fB-h\fP, \fB--help\fP
115 Show the built-in help text.
118 \fB-v\fP, \fB--verbose\fP
119 More verbose output. Use twice for even more verbose output.
122 \fB-V\fP, \fB--version\fP
123 Display version information.
125 .SH FILES
127 .IP "~/.cache/0install.net/implementations"
128 Cached implementations, indexed by manifest digest.
130 .IP "~/.config/0install.net/injector/implementation-dirs"
131 List of system cache directories, one per line.
133 .SH LICENSE
135 Copyright (C) 2006 Thomas Leonard.
138 You may redistribute copies of this program under the terms of the GNU General Public License.
140 .SH BUGS
142 Please report bugs to the developer mailing list:
144 http://0install.net/support.html
146 .SH AUTHOR
148 The Zero Install Injector was created by Thomas Leonard.
150 .SH SEE ALSO
151 0alias(1), 0launch(1)
153 The Zero Install web-site:
155 .B http://0install.net