1 |
On Tue, 22 Dec 2009 22:28:40 +0200, Alan McKinnon |
2 |
<alan.mckinnon@×××××.com> |
3 |
wrote: |
4 |
> On Tuesday 22 December 2009 19:21:21 Helmut Jarausch wrote: |
5 |
>> Hi, |
6 |
>> |
7 |
>> I have ebuilds fetching the source code directly from a repository |
8 |
>> (be it CVS,SVN,HG,GIT,...) |
9 |
>> I'd like to modify the .ebuild to enter compilation only if something |
10 |
>> has been updated. |
11 |
>> Is this possible, has somebody else tried to do so? |
12 |
> |
13 |
> You can't. |
14 |
> |
15 |
> The only things that trigger a recompile are the things you already know |
16 |
> |
17 |
> - version number change |
18 |
> - USE flag change |
19 |
> - mask change |
20 |
> |
21 |
> None of those things has occurred in your scenario, so a recompile will |
22 |
> not |
23 |
> happen. This is by design and you should leave it this way. |
24 |
|
25 |
I think that we are looking through the wrong lens. In this case version |
26 |
numbers will be plainly irrelevant 99% of the times, after all, it's a 9999 |
27 |
ebuild which we are talking about. Most times, the only factor that |
28 |
triggers the merge for a 9999 ebuild is *the user*. And nothing in the |
29 |
ebuild will prevent that of course, at least until Gentoo can control our |
30 |
minds, which will eventually happen :lol: What we should be looking at -in |
31 |
my humble opinion- is towards interrupting the execution of the ebuild once |
32 |
that we find that there's nothing new (like when you do 'emake || die'). |
33 |
That's certainly possible as long as the RCS tool used provides a |
34 |
consistent way to check if there has been a commit that needs to be |
35 |
downloaded. |
36 |
|
37 |
Of course, we would need some kind of IGNORE_RCS_CHECKS boolean variable |
38 |
to override this, for those cases where we truly need to force a |
39 |
recompilation of the offending package, or a similar mechanism, which could |
40 |
also be printed using ewarn, einfo or whatever applies for the situation |
41 |
when the ebuild aborts. |
42 |
|
43 |
As far as I can think, I see no fundamental showstopper, this could be |
44 |
implemented at the corresponding eclass for the given RCS backend, I guess. |
45 |
That would save the need to modify every single 9999 ebuild (not that there |
46 |
are a lot anyway). The only problem is that the fact that there's nothing |
47 |
to download doesn't necessarily mean that your binary files are in sync |
48 |
with your sources. For example, the source tree could have been updated on |
49 |
a previous run of the build, but something might have stopped it before the |
50 |
final objects are dumped into your real SO from the sandbox (electrical |
51 |
outages, control+c's, build failures). |
52 |
|
53 |
Also, I am no specialist in RCS's, and I have no idea if there's a truly |
54 |
reliable way to get the needed info from them. |
55 |
|
56 |
> It's best to just always recompile everything, which is what you do when |
57 |
> you |
58 |
> work with CVS code manually. |
59 |
> |
60 |
> I also asked the same question in the past - about e17 - the above is my |
61 |
|
62 |
> conclusions. |
63 |
|
64 |
The real question is if it's worth all the effort to implement the |
65 |
feature, I guess. In my case, when I am using development code for any |
66 |
reason I am also subscribed to the corresponding commits mailing list or |
67 |
tracker, that means that I get notified by email the following minute if |
68 |
there's anything new on that repository, and I can decide if the commit |
69 |
will do me any good or if I can wait for the next important one. So, in my |
70 |
case, the feature is not worth to invest a single minute. Of course, |
71 |
everyone is free to disagree. :) |
72 |
|
73 |
|
74 |
-- |
75 |
Jesús Guerrero |