On Tue, 22 Dec 2009 22:28:40 +0200, Alan McKinnon
<alan.mckin...@gmail.com>
wrote:
> On Tuesday 22 December 2009 19:21:21 Helmut Jarausch wrote:
>> Hi,
>> 
>> I have ebuilds fetching the source code directly from a repository
>> (be it CVS,SVN,HG,GIT,...)
>> I'd like to modify the .ebuild to enter compilation only if something
>> has been updated.
>> Is this possible, has somebody else tried to do so?
> 
> You can't.
> 
> The only things that trigger a recompile are the things you already know
> 
> - version number change
> - USE flag change
> - mask change
> 
> None of those things has occurred in your scenario, so a recompile will
> not 
> happen. This is by design and you should leave it this way.

I think that we are looking through the wrong lens. In this case version
numbers will be plainly irrelevant 99% of the times, after all, it's a 9999
ebuild which we are talking about. Most times, the only factor that
triggers the merge for a 9999 ebuild is *the user*.  And nothing in the
ebuild will prevent that of course, at least until Gentoo can control our
minds, which will eventually happen :lol: What we should be looking at -in
my humble opinion- is towards interrupting the execution of the ebuild once
that we find that there's nothing new (like when you do 'emake || die').
That's certainly possible as long as the RCS tool used provides a
consistent way to check if there has been a commit that needs to be
downloaded.

Of course, we would need some kind of IGNORE_RCS_CHECKS boolean variable
to override this, for those cases where we truly need to force a
recompilation of the offending package, or a similar mechanism, which could
also be printed using ewarn, einfo or whatever applies for the situation
when the ebuild aborts.

As far as I can think, I see no fundamental showstopper, this could be
implemented at the corresponding eclass for the given RCS backend, I guess.
That would save the need to modify every single 9999 ebuild (not that there
are a lot anyway). The only problem is that the fact that there's nothing
to download doesn't necessarily mean that your binary files are in sync
with your sources. For example, the source tree could have been updated on
a previous run of the build, but something might have stopped it before the
final objects are dumped into your real SO from the sandbox (electrical
outages, control+c's, build failures).

Also, I am no specialist in RCS's, and I have no idea if there's a truly
reliable way to get the needed info from them.

> It's best to just always recompile everything, which is what you do when
> you 
> work with CVS code manually.
> 
> I also asked the same question in the past - about e17 - the above is my

> conclusions.

The real question is if it's worth all the effort to implement the
feature, I guess. In my case, when I am using development code for any
reason I am also subscribed to the corresponding commits mailing list or
tracker, that means that I get notified by email the following minute if
there's anything new on that repository, and I can decide if the commit
will do me any good or if I can wait for the next important one. So, in my
case, the feature is not worth to invest a single minute. Of course,
everyone is free to disagree. :)


-- 
Jesús Guerrero

Reply via email to