1 |
Since all catapult discussion appears to be happening here, and I don't |
2 |
feel like registering from some forum that may or may not be read... |
3 |
|
4 |
Catapult, as it stands, probably isn't sanely usable in general and |
5 |
definitely isn't usable for Paludis. Here's why. |
6 |
|
7 |
The API is Broken |
8 |
----------------- |
9 |
|
10 |
* use of cpv throughout. cpv isn't enough to uniquely identify an ID, |
11 |
especially if there're overlays. cpvr is closer, but still doesn't |
12 |
work if you need to deal with virtuals directly (rather than the thing |
13 |
provided by the virtual) |
14 |
|
15 |
* use of regexes throughout. Every language defines its own, different |
16 |
regex dialect. There's no portability between languages. |
17 |
|
18 |
* No mention of EAPI anywhere. |
19 |
|
20 |
* No mention of error handling anywhere. |
21 |
|
22 |
* Generally lots of hard-coded ebuildy things that don't map well onto |
23 |
future EAPIs or handling of non-ebuilds (e.g. native CRAN support). |
24 |
|
25 |
* Essentially an abstraction of Portage internals, rather than an |
26 |
abstraction of a general package manager. |
27 |
|
28 |
* It's not clear how much of the API would be useful, or that the API |
29 |
provides enough to do something useful. |
30 |
|
31 |
* It's tied onto a single user configuration setup, and has no sane way |
32 |
of handling multiple configurations or unconfigured operation. |
33 |
|
34 |
* sets don't map on to package manager sets. |
35 |
|
36 |
* Administration: |
37 |
|
38 |
- version. But no name? |
39 |
|
40 |
* System: |
41 |
|
42 |
- find_best. What does this do if you give it foo/bar-1 foo/baz-1? |
43 |
What's the point of having this function at all? |
44 |
|
45 |
- find_best_match. What's a search key? If it's a spec, it needs an |
46 |
associated EAPI. What if only_installed is false? Does this mean we |
47 |
want both not installed and installed stuff? |
48 |
|
49 |
- find_packages. As find_best_match for search key. What disambiguation |
50 |
is performed upon the atom? What happens if you pass it something like |
51 |
'git', which is ambiguous? Regular expressions at this level is silly |
52 |
-- which of the zillion regex flavours do we use? Does it operate on |
53 |
installed, not installed or what? |
54 |
|
55 |
- get_config_path. Unportable. What if the user is using some other |
56 |
config format? |
57 |
|
58 |
- get_deep_option. Deep's a mess; making package managers emulate it via |
59 |
a command line switch is silly. |
60 |
|
61 |
- get_environment. In no way portable. |
62 |
|
63 |
- get_global_key. Again, unportable -- Paludis has no notion of global |
64 |
configuration. |
65 |
|
66 |
- get_merge_command. There's no nice way of using whatever this returns. |
67 |
And it's pointless -- why not just ask the package manager to do the |
68 |
merge? And what about package managers that require an explicit |
69 |
--install? When you ask for --sync or whatever, off what do you base |
70 |
the command? |
71 |
|
72 |
- get_newuse_option. Again, unportable and messy. |
73 |
|
74 |
- get_oneshot_option. Again, unportable and messy. |
75 |
|
76 |
- get_pretend_option. Again, unportable and messy. And probably useless |
77 |
-- what would you do with this? |
78 |
|
79 |
- get_sync_command. What's the point? Why not just ask the package |
80 |
manager to do the sync? |
81 |
|
82 |
- get_unmerge_option. Same. |
83 |
|
84 |
- get_update_option. Same as for get_deep_option. |
85 |
|
86 |
- get_updated_packages. Highly unclear what this really does. |
87 |
|
88 |
- get_use_desc. package should be a cpvr. |
89 |
|
90 |
- get_world_file_path. Unportable. |
91 |
|
92 |
- list_categories. String or regex? |
93 |
|
94 |
- sort_package_list. You don't want stuff sorted the way it's sorted by |
95 |
Paludis. You might want a well defined sort. |
96 |
|
97 |
- split_cpv. Why the weird revision thing? |
98 |
|
99 |
- update_world. Huh? In some ways pointlessly specific, in some ways way |
100 |
too vague. And what's this use flag stuff? We finally just about got |
101 |
people away from setting use flags in places other than config files, |
102 |
and for good reason. |
103 |
|
104 |
* Package |
105 |
|
106 |
- What do all of these do on unknown EAPI? |
107 |
|
108 |
- compare_version. But it takes packages. What's the ordering on |
109 |
foo/bar-1 vs bar/baz-1? |
110 |
|
111 |
- get_actual_use_flags. What's the point of this? |
112 |
|
113 |
- get_dep_packages. Hardcoding three dep classes is icky and doesn't |
114 |
work nicely with future EAPIs. And what's the return value? What about |
115 |
when || is in operation? |
116 |
|
117 |
- get_global_settings. No such thing as a global setting. |
118 |
|
119 |
- get_iuse_flags. What does this do for IUSE defaults? For installed |
120 |
packages, all flags are forced. |
121 |
|
122 |
- get_installed_use_flags. Empty list? Seriously? |
123 |
|
124 |
- get_masking_reason. Is the return value supposed to be used by |
125 |
anything other than a human? |
126 |
|
127 |
- get_matched_dep_packages. Huh? |
128 |
|
129 |
- get_overlay_path. What if it's in an overlay with no on-disk location? |
130 |
What if it's in some format the end tool doesn't recognise? |
131 |
|
132 |
- get_package_path. Ditto. |
133 |
|
134 |
- get_package_settings. What do you mean by everything? Just metadata? |
135 |
And what about EAPI? Some things don't make sense for some EAPIs or |
136 |
some package formats. |
137 |
|
138 |
- get_use_flags. Bad. No legit use. |
139 |
|
140 |
- is_in_system. System is a bad name. |
141 |
|
142 |
- is_testing. How does package.keywords alter whether a package is |
143 |
testing? |
144 |
|
145 |
- use_expanded. Not clear how this works when things aren't really |
146 |
expanded or when expanded keys aren't known. |
147 |
|
148 |
Why DBus? |
149 |
--------- |
150 |
|
151 |
What's the point in using DBus? What does it add over a simplified |
152 |
library with bindings? |
153 |
|
154 |
How does the whole privs thing work? Should anyone who can talk by DBus |
155 |
be allowed to perform privileged operations? Should anyone who can't |
156 |
perform privileged operations be allowed to do unprivileged operations? |
157 |
|
158 |
What about persistence? What's classed as a session? Why force it down |
159 |
to a single session at once? |
160 |
|
161 |
-- |
162 |
Ciaran McCreesh |