Dnia 2014-08-30, o godz. 16:02:51
"Anthony G. Basile" <[email protected]> napisał(a):

> I've written a GLEP which outlines a standard for what information 
> should be stored by any package management systems (PMS) in /var/db/pkg 
> (VDB) and mandates some API for exporting it to other tools [1].

I have trouble understanding the goal. As far as I can see, the idea
here is that every PM stores all information in any format, and exports
a Python API that has any synopsis and gives access to it... in any
format.

Wouldn't it be better to at least agree on some API for the metadata
exports? That will spare us the necessity of wrapping them all
in a common package or in every tool itself. Maybe it could even bring
some degree of interoperability between package managers.

As for the spec itself:

1. You're missing some of the metadata variables (RESTRICT,
PROPERTIES...). Wouldn't it be better to make one point worded like
'ebuild metadata as listed in PMS 13.2 Cache File Format'?

2. For *DEPEND, REQUIRED_USE (another one you missed) PMs store
dependency trees with USE conditionals evaluated. You may want to
explicitly note that.

3. I would use a copy of ebuild environment variables at the time of
completing the build (leaving last src_* phase?) -- IOW,
environment.bz2.

4. BUILD_TIME is not defined anywhere, so you may want to replace that
with verbose explanation of what is to be stored. For the remaining
metadata, you may want to reference PMS (the specification).

5. Please do not recommend Python modules since it discriminates
package managers written in C flavors. Instead, I suggest a plain CLI
API that gives best portability possibly. Alike:

  $ query-installed metadata sys-apps/coreutils-8.23 RDEPEND SLOT
  ...
  0

  $ query-installed file sys-apps/coreutils-8.23 /usr/bin/timeout SONAME
  ...
  
It should also have batch interface for querying multiple packages
quickly -- passing requests via stdin:

  $ query-installed batch
  [>] metadata sys-apps/coreutils-8.23 RDEPEND SLOT
  [<] ...
  [<] 0
  [>] file sys-apps/coreutils-8.23 /usr/bin/timeout SONAME
  [<] ...

6. Your Portage snippet uses outdated API. The modern one is to use
create_trees().

-- 
Best regards,
Michał Górny

Attachment: signature.asc
Description: PGP signature

Reply via email to