]> git.deb.at Git - deb/packages.git/blob - BACKEND
Remove obsolete descriptions.txt previously used for fulltext search
[deb/packages.git] / BACKEND
1 $Id$
2
3 Most package data is available via sleepycat databases. Those have been
4 specifically crafted for efficient lookup, and reasonable times to generate
5 them, so that both the daily cronjobs and the actual pagerequests take only a
6 moderate amount of CPU and I/O
7
8 The only pages that are really generated staticly are the pages listing all
9 packages in a given section.
10
11
12 This is a brief overview of the available databases:
13
14 *********************************************************
15 Generated by means of Packages.gz files:
16 *********************************************************
17
18 | packages_small.db:
19 |  key: packagename
20 |  value: \0 separated tuples of "archive suite arch component section priority version shortdescription"
21 |          (so you can split on spaces in 8 pieces, but need to not split further
22 |          because shortdescription can have spaces)
23   Notes: - maybe add did right before shortdescription?
24                  - for each suite, newest package is shown first, and (suite,
25                    architecture) is unique, the newest one is choosen. Once you find
26                    the right suite, you know you've got the newest, once you found
27                    your (suite,arch), you know you've found the only unique such entry
28                  - The very first element is different (TODO: maybe should be
29                    different DB then?), a \01 separated hash of suite -> provided-by,
30                    like "suite1\01prov1 prov2\01suite2\01prov1"
31
32 | package_postfixes.db:
33 |  key: a postfix string of a package name
34 |  value: \0-separated list of prefixes that can preseed this postfix with '^'
35 |         instead of the empty string in case a postfix happens to (also?) be
36 |         a full package name
37  Note: value can also be \01<decimal number>, meaning there were <decimal
38  number> different packages with that postfix (always more than 100)
39
40 | packages_descriptions.db:
41 |  key: "packagename version arch"
42 |  value: a unique description id, did
43  
44 | descriptions.db:
45 |  key: did
46 |  value: description, first line being short, the rest being long [no
47 |            newline transformation]
48
49 | descriptions_packages.db:
50 |  key: did
51 |  value: one or more occurances of: "packagename version arch", separated by \0
52
53 | packages_all_$suite.db:
54 |  key: "packagename arch version"
55 |  value: \0-separated pairs of key\0value items, with key being always
56 |         lowercase and having most normal Packages.gz entries, except:
57 |         - source: always available, contains straight source package name
58 |         - description: has did (description id) only
59 |         - archive: notes source archive
60
61 | sources_packages.db:
62 |  key: sourcepackagename
63 |  value: \0 separated tuples of "archive suite package version arch"
64
65   Note: this also comes from the Packages.gz files, and not from Sources.gz
66   files, for accuracy.
67
68 *********************************************************
69 Generated by means of Sources.gz files:
70 *********************************************************
71
72 | sources_small.db:
73 |  key: sourcename
74 |  value: \0 separated tuples of "archive suite component section priority version"
75
76 | source_postfixes.db:
77 |  key: a postfix string of a source name
78 |  value: \0-separated list of prefixes that can preseed this postfix with '^'
79 |         instead of the empty string in case a postfix happens to (also?) be
80 |         a full package name
81  Note: value can also be \01<decimal number>, meaning there were <decimal
82  number> different packages with that postfix (always more than 100)
83
84 | sources_all_$suite.db:
85 |  key: "archive suite sourcename"
86 |  value: \0-separated pairs of key\0value items, with key being always
87 |         lowercase and having most normal Sources.gz entries, except:
88 |         - files: \01 separated list of "md5 size filename"
89   Note: different key from packages_all, is that needed?
90
91 *********************************************************
92 Generated by means of Contents-$arch.gz files:
93 *********************************************************
94
95 This one is tricky, because it deals with about 1G of raw uncompressed data
96 per suite. Not all data is updated every day though, so dealing with that
97 efficiently pays off.
98
99 Each sourcefile will create a filelists_$suite_$arch.db, with prefix
100 compression. The last updated one will have a symlink from _all.db to it, to
101 help filelist queries for 'all' packages.
102
103 reverse_$suite_$arch.txt will be the reversed pathnames for that file,
104 lowercased, sorted, with packagename:arch following it.
105
106 For each suite, the suite-wide indices can then be updated by reading the 11
107 or so reverse_$suite_$arch.txt in sorted order with sort -m. Same pathnames
108 can be put together, and stored in reverse_$suite.db; filenames are then also
109 incidently coming by grouped uniquely (but reverse sorted, not normal sorted),
110 and can be written out linearly to filenames_$suite.txt
111