1 |
-----BEGIN PGP SIGNED MESSAGE-----
|
2 |
Hash: SHA1
|
3 |
|
4 |
On Wed, 17 Jul 2013 23:34:36 +0200
|
5 |
hasufell <hasufell@g.o> wrote:
|
6 |
|
7 |
> That means the methods for eclass changes must be more thoroughly. |
8 |
|
9 |
So must the methods to write ebuilds be more thoroughly; therefore, I
|
10 |
think that we can somewhat build a script that checks this from an
|
11 |
ebuild perspective. If we optimize this and make it more perfect by
|
12 |
no false positives, more efficient code, caching; we might perhaps be
|
13 |
able to turn this into a QA check in the future. See the attachment; as
|
14 |
a demonstration of what I think, I quickly hacked something together:
|
15 |
|
16 |
$ time treecheck /usr/portage/dev-python/bsddb3/bsddb3-5.3.0.ebuild
|
17 |
|
18 |
distutils-r1_python_compile used
|
19 |
in /usr/portage/dev-python/bsddb3/bsddb3-5.3.0.ebuild, but eclass
|
20 |
distutils-r1 might be missing!
|
21 |
|
22 |
python_execute_function used
|
23 |
in /usr/portage/dev-python/bsddb3/bsddb3-5.3.0.ebuild, but eclass
|
24 |
python might be missing!
|
25 |
|
26 |
real 0m6.558s
|
27 |
user 0m3.482s
|
28 |
sys 0m3.096s
|
29 |
|
30 |
http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-python/bsddb3/bsddb3-5.3.0.ebuild?revision=1.12&view=markup
|
31 |
|
32 |
Only 6 to 7 seconds to check an ebuild against 2000+ eclass functions!
|
33 |
|
34 |
For those interested in QA reports automation or some wicked IRC bot,
|
35 |
you can also run this against the whole tree by not passing an ebuild;
|
36 |
but at the moment, I consider this not well enough yet for that purpose.
|
37 |
I don't think the speed matters too much; given that the amount of
|
38 |
functions is limited and you don't need to run this too often, the
|
39 |
focus here should lie more on dealing with the false positives.
|
40 |
|
41 |
Another thing that comes to mind and shouldn't be hard to implement is
|
42 |
to give it an eclass, then have it just check the functions of that
|
43 |
eclass only across the tree; a matter of implementing a extension check
|
44 |
on $1 and depending on that fill in eclass_funcs or ebuilds.
|
45 |
|
46 |
To summarize it can benefit three groups of people:
|
47 |
|
48 |
1) A script (perhaps future QA check) to check for missing inherits.
|
49 |
|
50 |
2) A script for eclass maintainers to check for incorrect usage across
|
51 |
the three; can possible be extended to check situations were an
|
52 |
inherit is removed, give all cmake consumers with missing base inherit.
|
53 |
|
54 |
3) A script for QA people and reports to have an overview over the tree.
|
55 |
|
56 |
There is some potential here; so, I hope people are interested to help
|
57 |
contribute to or fork this piece of code into something more powerful.
|
58 |
|
59 |
- --
|
60 |
With kind regards,
|
61 |
|
62 |
Tom Wijsman (TomWij)
|
63 |
Gentoo Developer
|
64 |
|
65 |
E-mail address : TomWij@g.o
|
66 |
GPG Public Key : 6D34E57D
|
67 |
GPG Fingerprint : C165 AF18 AB4C 400B C3D2 ABF0 95B2 1FCD 6D34 E57D
|
68 |
-----BEGIN PGP SIGNATURE-----
|
69 |
Version: GnuPG v2.0.20 (GNU/Linux)
|
70 |
|
71 |
iQEcBAEBAgAGBQJR5yQ6AAoJEJWyH81tNOV9/zoH/jp915kmOxBTasfyyRbWr1Na
|
72 |
/XCEw9u5EStWId6hirls1RII3xvqlMn2CZ0VZXC2x/ZZibQCB79ij6jw/lcnSKao
|
73 |
otFOy7h4Pp4zD6a8pofYW6DXMwBPESIVDKB3TT0g/BJtA84gX1hO2ApEYPmKZjGi
|
74 |
dTMSxLgr57rnmg6syIE1LYk/iaeZLTgfiLE5qdBGXFbbNDgWrBGi++y4s3s44jww
|
75 |
s44ZbKrPlIxwHfCvZd4px7hMUvym37p259kStfmU7eAzs88oXh9MqsffM48Z1Tt7
|
76 |
Mw2lHqlPQprjhgE3ikul/uMuKXFH2epfuGlV43tFUx4fsGiKr7E25lwqfGbjB4g=
|
77 |
=2RGb
|
78 |
-----END PGP SIGNATURE----- |