FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 12-22-2009, 04:21 PM
Helmut Jarausch
 
Default make an -9999 ebuild compile only if necessary

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?

Many thanks for a hint,
Helmut.

--
Helmut Jarausch

Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany
 
Old 12-22-2009, 04:37 PM
Nikos Chantziaras
 
Default make an -9999 ebuild compile only if necessary

On 12/22/2009 07:21 PM, 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?


Given that portage relies on USE flags and version numbers to decide on
whether a rebuild is necessary, no, it's not possible.


But I'd be interested too if someone could think of some clever hack to
accomplish this
 
Old 12-22-2009, 04:42 PM
Paul Hartman
 
Default make an -9999 ebuild compile only if necessary

On Tue, Dec 22, 2009 at 11:21 AM, Helmut Jarausch
<jarausch@igpm.rwth-aachen.de> 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?

Hi,

I had the same idea/question some time ago and AFAIK this doesn't
exist yet... but I'd be happy for it, too.
 
Old 12-22-2009, 05:13 PM
Paul Hartman
 
Default make an -9999 ebuild compile only if necessary

On Tue, Dec 22, 2009 at 11:37 AM, Nikos Chantziaras <realnc@arcor.de> wrote:
> On 12/22/2009 07:21 PM, 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?
>
> Given that portage relies on USE flags and version numbers to decide on
> whether a rebuild is necessary, no, it's not possible.
>
> But I'd be interested too if someone could think of some clever hack to
> accomplish this

Maybe just make the merge fail. So that way you could "emerge
@live-rebuild --keep-going" and it would only actually emerge things
that had changed.
 
Old 12-22-2009, 07:28 PM
Alan McKinnon
 
Default make an -9999 ebuild compile only if necessary

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 suppose you *could* examine the version number in the CVS checkout, compare
it to the last built version and make a decision based on that. Two problems:

1. Such version numbers cannot universally be relied upon
2. Portage does not currently store this information in any way that I have
found, so you will need to patch portage.

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.

--
alan dot mckinnon at gmail dot com
 
Old 12-23-2009, 11:28 PM
Jesús Guerrero
 
Default make an -9999 ebuild compile only if necessary

On Tue, 22 Dec 2009 22:28:40 +0200, Alan McKinnon
<alan.mckinnon@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
 

Thread Tools




All times are GMT. The time now is 10:35 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org