Fixed error message about bad digest syntax.
[zeroinstall.git] / 0store.1
blob5adc61c34ca768ad18164425038ce760d426568d
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 find
14 \fBDIGEST\fP
16 .B 0store list
18 .B 0store manifest
19 \fBDIRECTORY\fP [ \fBALGORITHM\fP ]
21 .B 0store verify
22 ( \fBDIGEST\fP | \fBDIRECTORY\fP )
24 .SH DESCRIPTION
25 .PP
26 0store provides access to the low-level implementation cache. Normally, the
27 cache is updated automatically using 0launch(1).
29 .SH ADD
30 .PP
31 To add a directory to the store (makes a copy):
33 .B 0store add sha1=XXX directory
35 .PP
36 To add an archive to the store:
38 .B 0store add sha1=XXX archive.tgz
40 .PP
41 To add a subdirectory of an archive to the store:
43 .B 0store add sha1=XXX archive.tgz subdir
45 .PP
46 The actual digest is calculated and compared to the given one. If they don't
47 match, the operation is rejected.
49 .SH FIND
50 .PP
51 To find the path of a stored item:
53 .B 0store find sha1=XXX
55 .SH LIST
57 .PP
58 See the list of implementation caches currently configured:
60 .B 0store list
62 To add directories to this list, add them to your 'implementation-dirs'
63 configuration file.
65 .SH MANIFEST
66 .PP
67 To generate the manifest for a directory structure:
69 .B 0store manifest DIRECTORY [ALGORITHM]
71 .PP
72 The manifest lists every file and directory in the tree, along with the
73 digest of each file, thus uniquely identifying that particular set of files.
74 After the manifest, the last line gives the digest of the manifest itself.
76 .PP
77 This value is needed when creating interface files. However, the 0publish
78 command will automatically calculate the required digest for you and add it
79 to an interface file. See the packager's guide on the Zero Install web site for
80 details.
81 .PP
82 Supported algorithms are 'sha1' (supported by all versions), 'sha1new'
83 (requires injector 0.20 or later) and 'sha256' (requires injector 0.20 or later
84 AND the Python hashlib module).
86 .SH VERIFY
87 .PP
88 To check that an item is stored correctly:
90 .B 0store verify /path/to/sha1=XXX
92 This calculates the manifest of the directory and checks that its digest matches
93 the directory's name. It also checks that it matches the digest of the .manifest
94 file inside the directory. If the .manifest doesn't correspond to the current
95 tree, it displays a list of the differences (in unified diff format).
97 .SH COMMAND-LINE OPTIONS
99 .TP
100 \fB-h\fP, \fB--help\fP
101 Show the built-in help text.
104 \fB-v\fP, \fB--verbose\fP
105 More verbose output. Use twice for even more verbose output.
108 \fB-V\fP, \fB--version\fP
109 Display version information.
111 .SH FILES
113 .IP "~/.cache/0install.net/implementations"
114 Cached implementations, indexed by manifest digest.
116 .IP "~/.config/0install.net/injector/implementation-dirs"
117 List of system cache directories, one per line.
119 .SH LICENSE
121 Copyright (C) 2006 Thomas Leonard.
124 You may redistribute copies of this program under the terms of the GNU General Public License.
126 .SH BUGS
128 Please report bugs to the developer mailing list:
130 http://0install.net/support.html
132 .SH AUTHOR
134 The Zero Install Injector was created by Thomas Leonard.
136 .SH SEE ALSO
137 0alias(1), 0launch(1)
139 The Zero Install web-site:
141 .B http://0install.net