1 |
Dnia 2014-08-30, o godz. 16:02:51 |
2 |
"Anthony G. Basile" <blueness@g.o> napisał(a): |
3 |
|
4 |
> I've written a GLEP which outlines a standard for what information |
5 |
> should be stored by any package management systems (PMS) in /var/db/pkg |
6 |
> (VDB) and mandates some API for exporting it to other tools [1]. |
7 |
|
8 |
I have trouble understanding the goal. As far as I can see, the idea |
9 |
here is that every PM stores all information in any format, and exports |
10 |
a Python API that has any synopsis and gives access to it... in any |
11 |
format. |
12 |
|
13 |
Wouldn't it be better to at least agree on some API for the metadata |
14 |
exports? That will spare us the necessity of wrapping them all |
15 |
in a common package or in every tool itself. Maybe it could even bring |
16 |
some degree of interoperability between package managers. |
17 |
|
18 |
As for the spec itself: |
19 |
|
20 |
1. You're missing some of the metadata variables (RESTRICT, |
21 |
PROPERTIES...). Wouldn't it be better to make one point worded like |
22 |
'ebuild metadata as listed in PMS 13.2 Cache File Format'? |
23 |
|
24 |
2. For *DEPEND, REQUIRED_USE (another one you missed) PMs store |
25 |
dependency trees with USE conditionals evaluated. You may want to |
26 |
explicitly note that. |
27 |
|
28 |
3. I would use a copy of ebuild environment variables at the time of |
29 |
completing the build (leaving last src_* phase?) -- IOW, |
30 |
environment.bz2. |
31 |
|
32 |
4. BUILD_TIME is not defined anywhere, so you may want to replace that |
33 |
with verbose explanation of what is to be stored. For the remaining |
34 |
metadata, you may want to reference PMS (the specification). |
35 |
|
36 |
5. Please do not recommend Python modules since it discriminates |
37 |
package managers written in C flavors. Instead, I suggest a plain CLI |
38 |
API that gives best portability possibly. Alike: |
39 |
|
40 |
$ query-installed metadata sys-apps/coreutils-8.23 RDEPEND SLOT |
41 |
... |
42 |
0 |
43 |
|
44 |
$ query-installed file sys-apps/coreutils-8.23 /usr/bin/timeout SONAME |
45 |
... |
46 |
|
47 |
It should also have batch interface for querying multiple packages |
48 |
quickly -- passing requests via stdin: |
49 |
|
50 |
$ query-installed batch |
51 |
[>] metadata sys-apps/coreutils-8.23 RDEPEND SLOT |
52 |
[<] ... |
53 |
[<] 0 |
54 |
[>] file sys-apps/coreutils-8.23 /usr/bin/timeout SONAME |
55 |
[<] ... |
56 |
|
57 |
6. Your Portage snippet uses outdated API. The modern one is to use |
58 |
create_trees(). |
59 |
|
60 |
-- |
61 |
Best regards, |
62 |
Michał Górny |