Re: [gentoo-dev] [RFC] Dropping (or enabling only on request) bootstrap from SCM eclasses

2009-09-28 Thread Donnie Berkholz
On 15:46 Thu 24 Sep , Maciej Mrozowski wrote:
> Because autopatcher makes it able to specify patches that are version 
> independent (same patches for live and tagged ebuilds), while SCM 
> patching/bootstrapping may be used for some specific cases (I haven't seen 
> any 
> yet personally, hence suggestions to drop it completely or disable by default 
> and not to export src_prepare).

Patching not so much, but bootstrapping w/ eautoreconf/autogen.sh 
totally.

> When migrating SCM eclasses to EAPI-2, I recommended leaving bootstrap in 
> src_unpack phase and not to move it to src_prepare because I was well aware 
> it 
> will break most live EAPI-2 ebuilds having 'inherit  '. And 
> because developers doing this change didn't care for that case, I don't see 
> why now  they should oppose the idea to fix what they've broken, especially 
> when it's probably going to affect only bad live EAPI-2 ebuilds (with not 
> working PATCHES).
> 
> But anyway, think for a while about the purpose of SCM eclasses. At least in 
> my opinion, they should only provide [tarball or SCM] -> SRCDIR delivery 
> method, so just unpack method - any source processing should be purely 
> *intentional* (and not enabled by default in SCM eclasses) - so in my opinion 
> - unconditionally shadowing src_prepare by SCM eclasses is just 
> architecturally wrong and needs to be fixed.

The purpose of SCM eclasses, in my mind, is to provide an environment as 
similar as possible to that of a released tarball. That certainly 
includes bootstrapping. It gets annoying when I need to fiddle around 
with patching the build system if bootstrapping happens during 
src_unpack(). Then I end up patching during src_unpack(), which goes 
against the whole idea of src_prepare().

-- 
Thanks,
Donnie

Donnie Berkholz
Developer, Gentoo Linux
Blog: http://dberkholz.wordpress.com



Re: [gentoo-dev] [RFC] Dropping (or enabling only on request) bootstrap from SCM eclasses

2009-09-24 Thread Maciej Mrozowski
On Thursday 24 of September 2009 08:32:53 Ulrich Mueller wrote:

It's all about making live <-> tagged ebuild synchronization easier.
Currently

> Not a good idea, IMHO. In pre-EAPI-2, the SCM eclasses shadow
> src_unpack of base.eclass, so also no autopatching of base.eclass
> takes place. If we now change it _not_ to export src_prepare, then
> there may be surprises when bumping an ebuild to EAPI-2.

I think only those will be surprised, who declare PATCHES variable
and who don't make use of it. To ensure we're on the same page, autopatcher 
is:

PATCHES=(
"${FILESDIR}/patch1"
"${FILESDIR}/patch2"
)

accompanied with invocation of base_src_prepare (EAPI-2) or base_src_unpack 
(pre-EAPI-2).
And when bumping ebuild EAPI one is required anyway to verify whether patches 
are applicable, proper phases are invoked etc.

The only other people who are going to be surprised would be those who rely on 
current implicit SCM src_prepare behaviour but I'm yet to find anyone with 
such ebuild.

Actually *now* there's surprise factor all the time when using tagged EAPI-2 
ebuild to create live EAPI-2 ebuild as it requires either explicitly 
overriding src_prepare or src_unpack, because when you just place

'inherit someeclass git'

PATCHES=("file1" " file2")

it will shadow src_prepare and *silently* ignore autopatcher you may think 
you're using (hey, PATCHES variable is there!). Current situation makes live 
<-> tagged ebuild synchronization a bit less convenient and certainly more 
tricky.

> Besides, most SCM eclasses (at least cvs, subversion, git and bzr)
> have their own autopatch facility running in src_prepare (before
> bootstrap). Why would one need _both_ this and the one in base.eclass?

Because autopatcher makes it able to specify patches that are version 
independent (same patches for live and tagged ebuilds), while SCM 
patching/bootstrapping may be used for some specific cases (I haven't seen any 
yet personally, hence suggestions to drop it completely or disable by default 
and not to export src_prepare).

When migrating SCM eclasses to EAPI-2, I recommended leaving bootstrap in 
src_unpack phase and not to move it to src_prepare because I was well aware it 
will break most live EAPI-2 ebuilds having 'inherit  '. And 
because developers doing this change didn't care for that case, I don't see 
why now  they should oppose the idea to fix what they've broken, especially 
when it's probably going to affect only bad live EAPI-2 ebuilds (with not 
working PATCHES).

But anyway, think for a while about the purpose of SCM eclasses. At least in 
my opinion, they should only provide [tarball or SCM] -> SRCDIR delivery 
method, so just unpack method - any source processing should be purely 
*intentional* (and not enabled by default in SCM eclasses) - so in my opinion 
- unconditionally shadowing src_prepare by SCM eclasses is just 
architecturally wrong and needs to be fixed.

-- 
regards
MM


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-dev] [RFC] Dropping (or enabling only on request) bootstrap from SCM eclasses

2009-09-23 Thread Ulrich Mueller
> On Thu, 24 Sep 2009, Maciej Mrozowski wrote:

> Because SCM bootstrap is either not used at all, or used very
> rarely, there's suggestion to:
> - either drop it
> - or (preferably) to make SCM eclasses export src_prepare only on
>   specific request
> - or to make it easier - to not export it at all - thus making it
>   required for developer to intentionally invoke
>   ${ECLASS}_src_prepare if bootstrapping is required.

Not a good idea, IMHO. In pre-EAPI-2, the SCM eclasses shadow
src_unpack of base.eclass, so also no autopatching of base.eclass
takes place. If we now change it _not_ to export src_prepare, then
there may be surprises when bumping an ebuild to EAPI-2.

Besides, most SCM eclasses (at least cvs, subversion, git and bzr)
have their own autopatch facility running in src_prepare (before
bootstrap). Why would one need _both_ this and the one in base.eclass?

Ulrich