1 |
Hello, all. |
2 |
|
3 |
As part of future-eapi I had suggested introducing a new phase function |
4 |
that would be used to determine whether a live ebuild needs to be |
5 |
updated (rebuilt) [1]. Since the work on EAPI 6 is getting awfully |
6 |
delayed, and EAPI 7 is even less likely, I'd like to implement |
7 |
the needed facilities on top of current EAPI in smart-live-rebuild. |
8 |
|
9 |
For this reason, I'd like to ask you to review the tiny spec I've made |
10 |
so that hopefully one day we wouldn't have to reinvent it all for EAPI |
11 |
7. |
12 |
|
13 |
The spec would be: |
14 |
|
15 |
An ebuild (eclass) can declare optional pkg_needrebuild() phase |
16 |
function. The function is called outside of regular ebuild process |
17 |
(alike pkg_pretend()), in the goal of determining whether a particular |
18 |
package needs to be rebuilt. This can be because of sources being |
19 |
changed (VCS) or possibly some other reason (-updaters when subslots |
20 |
are not good enough?). |
21 |
|
22 |
The function is run in environment containing all variables exported |
23 |
by the previous source build. It must not access or assume existence of |
24 |
$WORKDIR, $D... |
25 |
|
26 |
The function can return one of the following return codes: |
27 |
|
28 |
- 0 -- indicating that the package should be rebuilt from ebuild |
29 |
(changes occured), |
30 |
|
31 |
- 1 -- indicating that the package needs not be rebuilt. |
32 |
|
33 |
The function must use 'die' if an error preventing the function |
34 |
from determining the state occurs. |
35 |
|
36 |
The function can output any user-oriented messages. The following |
37 |
output functions are made available: einfo, einfon, elog, ewarn, |
38 |
eerror, ebegin, eend. The following additional functions are available: |
39 |
die, assert, has, hasv, hasq. |
40 |
|
41 |
And just to be clear: I'd love to just support a subset of those |
42 |
functions but don't want to get too confusing with PMS. |
43 |
|
44 |
Does this sound fine? Any suggestions? |
45 |
|
46 |
[1]:https://bugs.gentoo.org/show_bug.cgi?id=482666 |
47 |
|
48 |
-- |
49 |
Best regards, |
50 |
Michał Górny |
51 |
<http://dev.gentoo.org/~mgorny/> |