GLEP 35: Automated consistency check for ebuilds
|Author||Adrian Lambeck <email@example.com>|
This proposal is meant to enhance productivity for Gentoo developers. It aims to reduce the number of trivial bugs by automatically detecting them through a consistency check that is performed before checking and on a regular basis through the whole tree. Why bother with trivial bugs when automated tests find them ? Save time and improve quality !
When browsing bugs.gentoo.org you will find Bugs that take away a good amount of scarce developing time that could be used otherwise. These are trivial bugs, i.e. wrong SRC_URI or cycles in DEPEND. Even worst - these bugs are sometimes reported several times so that they need to be marked as duplicates. Bugs of that kind are easy to find and easy to fix. By using automatic checks on a regular schedule these bugs can be found. Users have to be asked NOT to commit these bugs to bugs.gentoo.org. So there will (hopefully) be fewer bugs that need to be checked and assigned and they might get fixed faster.
The Bugs found should be kept in an automatically generated list so that users can see that the problem has been caught and that it is being worked on.
Checks need to be performed for every ebuild.
A report needs to be generated
- links to the specific problem need to be included
- reports need to be send to the groups responsible
Checks could be:
- cycles within DEPEND
- invalid SRC_URI
- "non-official" USE Flags
- Packages within DEPEND that are "*" for the arch specified
- broken shell scripts with invalid or missing commands
- inheritance of eclasses
There might be other checks and tests that should be run that have not come to my mind yet. Also I might have suggested something that is not useful at all.
If there are major problems (needs to be defined) within an ebuild a possible action could be to disable the ebuild (with "-*",) perhaps, and send a mail to the maintainer.
These kind of errors are not always the fault of the developers.
There should be no compilation or something like that. If an ebuild fails to build somewhere then the user should file it as a bug as usual.
The functionality described could be implemented in three ways:
- On the developers machine ("client") where it is run before checking
- only for the ebuilds that changed. (client does not fit here because the server and client should not communicate with each other at all)
- On the server where checks are run, i.e. once a week.
- On the "client" AND server
Of course there are cons and pros (what came to my mind so far)
- the tree can not become inconsistent in the first place (? see contra)
- once an ebuild is checked there is no need to do this again
- no dedicated machine necessary
- generate traffic only once on one machine
- errors that are caught here do not bother later on
- the consistency is based on the tool installed
- (what happens when different devs use different versions ?)
- what happens when the ebuild layout changes and some ebuilds
- do not get updated ?
- Properties of other ebuilds might change that fit while writing an ebuild
- the errors are found when the ebuild is already in CVS
- the whole tree needs to be checked
- possibly creates a lot of traffic on every run
- (-> is there an FTP equivalent to HTTP`s HEAD ?)
- see 1. and 2.
My favorite is 3 . All properties are checked before check-in and the properties that change might be checked on a regular basis on the server. Only solution 3 brings the best from 1 and 2 together while delivering the best result.
I never had a look at portage source but I can imagine that there is a library that has everything that a developer needs to "query" ebuilds. If not, this would be a reason for another GLEP (?).
For performance I would use a database (on the server) to store the whole tree before running the checks. This is not necessary for the "client".
Not a problem for this GLEP.