Gentoo Archives: gentoo-portage-dev

From: Fabian Groffen <grobian@g.o>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] [RFC] Adding extra vars to md5-cache, for QA&tooling purposes
Date: Fri, 26 Jul 2019 06:49:15
Message-Id: 20190726064906.GH18573@gentoo.org
In Reply to: [gentoo-portage-dev] [RFC] Adding extra vars to md5-cache, for QA&tooling purposes by "Michał Górny"
1 Hi,
2
3 On 25-07-2019 14:20:50 +0200, Michał Górny wrote:
4 > Hi,
5 >
6 > TL;DR: I'd like to make it possible for ebuilds to define additional
7 > variables that will be stored in md5-cache. This would be useful for CI
8 > and other tooling that right now has to parse ebuilds for other data.
9
10 Only downside I can think of, is a diskspace increase for the md5-cache.
11 Not sure if this is going to be substantial, but given things like
12 PYTHON_COMPAT, perhaps a quick calculation of extra "cost" can be made.
13 Should diskspace become a problem, one could consider to use a separate
14 file/dir, that users could rsync-exclude, since Portage won't need it to
15 operate properly.
16
17 Thanks,
18 Fabian
19
20 >
21 >
22 > The idea is to add a new incremental ebuild/eclass variable (technical
23 > name: QA_EXTRA_CACHE_VARS) that would define additional data to be
24 > stored in cache. For example, python*-r1 eclasses would define
25 > 'PYTHON_COMPAT', acct-user would define 'ACCT_USER_ID', etc.
26 >
27 > When regenerating cache, the PM would read this variable, and store
28 > the values of all defined variables into md5-cache. As a result,
29 > programs needing those variables can get them straight from cache
30 > without having to attempt to run or parse ebuilds (which is both slow
31 > and prone to bugs).
32 >
33 > This would benefit e.g. gpyutils that right now need to attempt to parse
34 > PYTHON_COMPAT from ebuilds. It would also benefit writing future
35 > pkgcheck checks for user/group ID collisions.
36 >
37 >
38 > Notes:
39 >
40 > - since md5-cache uses key-value format and allows for future
41 > extensions, the new values can be added without breaking anything;
42 >
43 > - md5-cache is not specified in the PMS, and the whole thing can be
44 > implemented without need for EAPI bump,
45 >
46 > - I would like to have this implemented consistently both in Portage
47 > and pkgcore,
48 >
49 > - we will need to clearly define how to dump arrays.
50 >
51 >
52 > What do you think?
53 >
54 > --
55 > Best regards,
56 > Michał Górny
57 >
58
59
60
61 --
62 Fabian Groffen
63 Gentoo on a different level

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies