public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] make an -9999 ebuild compile only if necessary
@ 2009-12-22 17:21 Helmut Jarausch
  2009-12-22 17:37 ` [gentoo-user] " Nikos Chantziaras
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Helmut Jarausch @ 2009-12-22 17:21 UTC (permalink / raw
  To: gentoo-user

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



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [gentoo-user]  Re: make an -9999 ebuild compile only if necessary
  2009-12-22 17:21 [gentoo-user] make an -9999 ebuild compile only if necessary Helmut Jarausch
@ 2009-12-22 17:37 ` Nikos Chantziaras
  2009-12-22 18:13   ` Paul Hartman
  2009-12-22 17:42 ` [gentoo-user] " Paul Hartman
  2009-12-22 20:28 ` Alan McKinnon
  2 siblings, 1 reply; 6+ messages in thread
From: Nikos Chantziaras @ 2009-12-22 17:37 UTC (permalink / raw
  To: gentoo-user

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 :)




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-user] make an -9999 ebuild compile only if necessary
  2009-12-22 17:21 [gentoo-user] make an -9999 ebuild compile only if necessary Helmut Jarausch
  2009-12-22 17:37 ` [gentoo-user] " Nikos Chantziaras
@ 2009-12-22 17:42 ` Paul Hartman
  2009-12-22 20:28 ` Alan McKinnon
  2 siblings, 0 replies; 6+ messages in thread
From: Paul Hartman @ 2009-12-22 17:42 UTC (permalink / raw
  To: gentoo-user

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. :)



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-user] Re: make an -9999 ebuild compile only if necessary
  2009-12-22 17:37 ` [gentoo-user] " Nikos Chantziaras
@ 2009-12-22 18:13   ` Paul Hartman
  0 siblings, 0 replies; 6+ messages in thread
From: Paul Hartman @ 2009-12-22 18:13 UTC (permalink / raw
  To: gentoo-user

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.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-user] make an -9999 ebuild compile only if necessary
  2009-12-22 17:21 [gentoo-user] make an -9999 ebuild compile only if necessary Helmut Jarausch
  2009-12-22 17:37 ` [gentoo-user] " Nikos Chantziaras
  2009-12-22 17:42 ` [gentoo-user] " Paul Hartman
@ 2009-12-22 20:28 ` Alan McKinnon
  2009-12-24  0:28   ` Jesús Guerrero
  2 siblings, 1 reply; 6+ messages in thread
From: Alan McKinnon @ 2009-12-22 20:28 UTC (permalink / raw
  To: gentoo-user

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



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-user] make an -9999 ebuild compile only if necessary
  2009-12-22 20:28 ` Alan McKinnon
@ 2009-12-24  0:28   ` Jesús Guerrero
  0 siblings, 0 replies; 6+ messages in thread
From: Jesús Guerrero @ 2009-12-24  0:28 UTC (permalink / raw
  To: gentoo-user

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



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-12-24  2:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-22 17:21 [gentoo-user] make an -9999 ebuild compile only if necessary Helmut Jarausch
2009-12-22 17:37 ` [gentoo-user] " Nikos Chantziaras
2009-12-22 18:13   ` Paul Hartman
2009-12-22 17:42 ` [gentoo-user] " Paul Hartman
2009-12-22 20:28 ` Alan McKinnon
2009-12-24  0:28   ` Jesús Guerrero

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox