* [gentoo-dev] Using default src_compile() in ebuilds
@ 2002-05-24 7:01 Arcady Genkin
2002-05-24 7:29 ` Ryan Shaw
0 siblings, 1 reply; 4+ messages in thread
From: Arcady Genkin @ 2002-05-24 7:01 UTC (permalink / raw
To: gentoo-dev
Someone submitted an ebuild that does not define src_compile()
explicitely. The ebuild seems to work fine, but I am not sure whether
this is acceptable. My main concern is whether the default
src_compile() will abort merging a package if configuration or
compilation step fails.
Personally, I'd prefer an explicit src_compile in every ebuild, but I
can also see the benefits of reusing code from the default one.
--
Arcady Genkin
Thanks God I'm still an atheist! -- Luis Bunuel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-dev] Using default src_compile() in ebuilds
2002-05-24 7:01 [gentoo-dev] Using default src_compile() in ebuilds Arcady Genkin
@ 2002-05-24 7:29 ` Ryan Shaw
2002-05-24 8:03 ` Arcady Genkin
0 siblings, 1 reply; 4+ messages in thread
From: Ryan Shaw @ 2002-05-24 7:29 UTC (permalink / raw
To: gentoo-dev
Arcady wrote:
> Someone submitted an ebuild that does not define src_compile()
> explicitely. The ebuild seems to work fine, but I am not sure whether
> this is acceptable. My main concern is whether the default
> src_compile() will abort merging a package if configuration or
> compilation step fails.
actually, it won't fail. but i think this a bug in ebuild.sh.
the default src_compile() returns 1 if it fails:
src_compile() {
if [ -x ./configure ] ; then
econf || return 1
emake || return 1
fi
return
}
but dyn_compile() is not checking the return value. i think
it should. until this is fixed, though, it is probably better
not to use the default src_compile().
> Personally, I'd prefer an explicit src_compile in every ebuild, but I
> can also see the benefits of reusing code from the default one.
i think it would be nice to reuse the default one if possible.
but if you disagree, then i think the default src_compile() should
be changed to do nothing, otherwise the implication is that people
should use it.
ryan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-dev] Using default src_compile() in ebuilds
2002-05-24 7:29 ` Ryan Shaw
@ 2002-05-24 8:03 ` Arcady Genkin
2002-05-24 8:17 ` Ryan Shaw
0 siblings, 1 reply; 4+ messages in thread
From: Arcady Genkin @ 2002-05-24 8:03 UTC (permalink / raw
To: gentoo-dev
Ryan Shaw <ryan.shaw@stanfordalumni.org> writes:
>> Personally, I'd prefer an explicit src_compile in every ebuild, but I
>> can also see the benefits of reusing code from the default one.
>
> i think it would be nice to reuse the default one if possible.
> but if you disagree, then i think the default src_compile() should
> be changed to do nothing, otherwise the implication is that people
> should use it.
Well, it is not documented, and until now I was under [empirically
proven] impression that if you don't specify src_compile()
explicitely, then the compilation step will be skipped, which makes
perfect sense to me. If we are going to keep the default
src_compile(), then we should at least document it, so that the
developer knew what to expect from it.
For instance, why is it that there is compilation only in presence of
"configure" script? Why not just check for a presence of a Makefile?
One possible reason is that if there was no configure, then the CFLAGS
won't be handled properly, which is absolutely correct. But I'd think
that we should act according to the principle of the least surprise
here: if src_compile is not specified, then there is no compilation
necessary for this package.
I also think that providing a default src_compile() may encourage
sloppiness when writing the ebuilds.
--
Arcady Genkin
Thanks God I'm still an atheist! -- Luis Bunuel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-dev] Using default src_compile() in ebuilds
2002-05-24 8:03 ` Arcady Genkin
@ 2002-05-24 8:17 ` Ryan Shaw
0 siblings, 0 replies; 4+ messages in thread
From: Ryan Shaw @ 2002-05-24 8:17 UTC (permalink / raw
To: gentoo-dev
Arcady wrote:
> we should act according to the principle of the least surprise
> here: if src_compile is not specified, then there is no compilation
> necessary for this package.
that sounds reasonable. in that case can you file a bug against
portage to change src_compile to just return?
ryan
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-05-24 8:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-05-24 7:01 [gentoo-dev] Using default src_compile() in ebuilds Arcady Genkin
2002-05-24 7:29 ` Ryan Shaw
2002-05-24 8:03 ` Arcady Genkin
2002-05-24 8:17 ` Ryan Shaw
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox