-
Notifications
You must be signed in to change notification settings - Fork 1
/
SEARCHES
135 lines (101 loc) · 3.89 KB
/
SEARCHES
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
SEARCHES
========
Overview over all types of searches that are supported and which
parameters they use.
general TODO: allow to search for a specific version?
parameter types:
----------------
PKG_NAME =~ ^[\w+.-]+$
SUITE_NAME =~ ^[\w-]+$
ARCHIVE_NAME =~ ^[\w-]+$
SECTION_NAME =~ ^[\w-]+$
ARCH_NAME =~ ^[\w-]+$
PATH_NAME =~ ^[\w.:+/-]+$ <-- what to allow here?
if an parameter type is suffixes with (s) this means you can
specify an array of values separated by commas.
package, suite, archive, section, and arch can also be specified via
PATH_INFO (mode too?). They can not take more than one value then, though.
search for package name:
------------------------
searchon=names
required parameters:
keywords [PKG_NAME]
optional parameters:
suite [SUITE_NAME(s) | 'all'] default='all'
archive [ARCHIVE_NAME(s) | 'all' ] default='all'
section [SECTION_NAME(s) | 'all' ] default='all'
arch [ARCH_NAME(s) | 'any' ] default='any'
exact [BOOL] default=1
TODO: Allow more than one keyword
-> hm? Example?
J: If exact is not specified, lookup exact and if that fails show
substring matches -- search is cheap? Maybe totally drop exact parameter, and
do this always? Less options == easier interface (or so gnome devs say)
Only in case of $ROOT/<pkg>, exact should be forced and
substring/description searches only offered (not performed by default)
full text search in package names and descriptions:
---------------------------------------------------
searchon=all (fixme)
required parameters:
keywords [STRING]
optional parameters:
suite [SUITE_NAME(s) | 'all'] default='all'
archive [ARCHIVE_NAME(s) | 'all' ] default='all'
section [SECTION_NAME(s) | 'all' ] default='all'
arch [ARCH_NAME(s) | 'any' ] default='any'
exact [BOOL] default=1
TODO: Allow more than one keyword
J: should already work? Only gives hits where keywords are subsequent
though...
display one package:
--------------------
required parameters:
package [PKG_NAME]
suite [SUITE_NAME]
optional parameters:
archive [ARCHIVE_NAME(s) | 'default' | 'all' ] default=( us security non-US )
section [SECTION_NAME(s) | 'all' ] default='all'
arch [ARCH_NAME(s) | 'any' ] default='any'
J: Do we really want random path-element order here? Why not force order like
in URLS?
download one package:
---------------------
required parameters:
package [PKG_NAME]
suite [SUITE_NAME]
arch [ARCH_NAME]
optional parameters:
archive [ARCHIVE_NAME(s) | 'default' | 'all' ] default=( us security non-US )
TODO: support section?
J: same comments as with one-package-page
show file list for one package:
-------------------------------
required parameters:
package [PKG_NAME]
suite [SUITE_NAME]
arch [ARCH_NAME]
optional parameters:
archive [ARCHIVE_NAME(s) | 'default' | 'all' ] default=( us security non-US )
TODO: support section?
J: Same comments as with one-package-page
search for file:
----------------
searchon=contents
required parameters:
keyword [PATH_NAME]
?suite [SUITE_NAME]
?arch [ARCH_NAME]
?mode [ 'file' | 'dir' | 'full' ]
optional parameters:
archive [ARCHIVE_NAME(s) | 'default' | 'all' ] default=( us security non-US )
TODO: support section?
suite/arch were required in the old version, still are?
which modes do we want? The old ones were "files", "dirs+files", "full"
J: suite is still required, arch is not (it's not even supported atm, but
trivially would be). An easy crosslink a la [stable][testing][unstable] would
be adviseable
mode is implemented via exact and fullfilename parameters currently (both
cannot be set at the same time), mode would be better indeed. Possibilities
are currently "ends-with", "exact filename" and "filename substring". I don't
think more would be useful, with 'bin/foo' for example you can then find
/usr/bin/foo and /bin/foo and /sbin/foo, but simply not /bin/foobar