public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-portage-dev] [PATCH] EAPI 6: Fail if eapply_user is not called in src_prepare()
@ 2015-11-17 22:20 Michał Górny
  2015-11-17 23:32 ` Zac Medico
  2015-11-18  7:01 ` Ulrich Mueller
  0 siblings, 2 replies; 7+ messages in thread
From: Michał Górny @ 2015-11-17 22:20 UTC (permalink / raw
  To: gentoo-portage-dev; +Cc: Michał Górny

---
 bin/phase-functions.sh | 6 ++++++
 bin/phase-helpers.sh   | 1 +
 2 files changed, 7 insertions(+)

diff --git a/bin/phase-functions.sh b/bin/phase-functions.sh
index 7bf4d63..abbc602 100644
--- a/bin/phase-functions.sh
+++ b/bin/phase-functions.sh
@@ -374,6 +374,12 @@ __dyn_prepare() {
 	__ebuild_phase pre_src_prepare
 	__vecho ">>> Preparing source in $PWD ..."
 	__ebuild_phase src_prepare
+
+	# keep path in eapply_user in sync!
+	if [[ ! -f ${T}/.portage_user_patches_applied ]]; then
+		die "eapply_user (or default) must be called in src_prepare()!"
+	fi
+
 	>> "$PORTAGE_BUILDDIR/.prepared" || \
 		die "Failed to create $PORTAGE_BUILDDIR/.prepared"
 	__vecho ">>> Source prepared."
diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh
index 6c45c25..da9aa7c 100644
--- a/bin/phase-helpers.sh
+++ b/bin/phase-helpers.sh
@@ -1079,6 +1079,7 @@ fi
 
 if ___eapi_has_eapply_user; then
 	eapply_user() {
+		# keep path in __dyn_prepare in sync!
 		local tagfile=${T}/.portage_user_patches_applied
 		[[ -f ${tagfile} ]] && return
 		>> "${tagfile}"
-- 
2.6.3



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

* Re: [gentoo-portage-dev] [PATCH] EAPI 6: Fail if eapply_user is not called in src_prepare()
  2015-11-17 22:20 [gentoo-portage-dev] [PATCH] EAPI 6: Fail if eapply_user is not called in src_prepare() Michał Górny
@ 2015-11-17 23:32 ` Zac Medico
  2015-11-18  7:01 ` Ulrich Mueller
  1 sibling, 0 replies; 7+ messages in thread
From: Zac Medico @ 2015-11-17 23:32 UTC (permalink / raw
  To: gentoo-portage-dev; +Cc: Michał Górny

On 11/17/2015 02:20 PM, Michał Górny wrote:
> ---
>  bin/phase-functions.sh | 6 ++++++
>  bin/phase-helpers.sh   | 1 +
>  2 files changed, 7 insertions(+)
> 
> diff --git a/bin/phase-functions.sh b/bin/phase-functions.sh
> index 7bf4d63..abbc602 100644
> --- a/bin/phase-functions.sh
> +++ b/bin/phase-functions.sh
> @@ -374,6 +374,12 @@ __dyn_prepare() {
>  	__ebuild_phase pre_src_prepare
>  	__vecho ">>> Preparing source in $PWD ..."
>  	__ebuild_phase src_prepare
> +
> +	# keep path in eapply_user in sync!
> +	if [[ ! -f ${T}/.portage_user_patches_applied ]]; then
> +		die "eapply_user (or default) must be called in src_prepare()!"
> +	fi
> +
>  	>> "$PORTAGE_BUILDDIR/.prepared" || \
>  		die "Failed to create $PORTAGE_BUILDDIR/.prepared"
>  	__vecho ">>> Source prepared."
> diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh
> index 6c45c25..da9aa7c 100644
> --- a/bin/phase-helpers.sh
> +++ b/bin/phase-helpers.sh
> @@ -1079,6 +1079,7 @@ fi
>  
>  if ___eapi_has_eapply_user; then
>  	eapply_user() {
> +		# keep path in __dyn_prepare in sync!
>  		local tagfile=${T}/.portage_user_patches_applied
>  		[[ -f ${tagfile} ]] && return
>  		>> "${tagfile}"
> 

Looks good. I guess we better get this in a release soonish, before we
have a bunch of EAPI 6 ebuilds that forget to call eapply_user.
-- 
Thanks,
Zac


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

* Re: [gentoo-portage-dev] [PATCH] EAPI 6: Fail if eapply_user is not called in src_prepare()
  2015-11-17 22:20 [gentoo-portage-dev] [PATCH] EAPI 6: Fail if eapply_user is not called in src_prepare() Michał Górny
  2015-11-17 23:32 ` Zac Medico
@ 2015-11-18  7:01 ` Ulrich Mueller
  2015-11-18  7:03   ` Michał Górny
                     ` (2 more replies)
  1 sibling, 3 replies; 7+ messages in thread
From: Ulrich Mueller @ 2015-11-18  7:01 UTC (permalink / raw
  To: gentoo-portage-dev; +Cc: Michał Górny

[-- Attachment #1: Type: text/plain, Size: 367 bytes --]

>>>>> On Tue, 17 Nov 2015, Michał Górny wrote:

>  	__ebuild_phase src_prepare
> +
> +	# keep path in eapply_user in sync!
> +	if [[ ! -f ${T}/.portage_user_patches_applied ]]; then
> +		die "eapply_user (or default) must be called in src_prepare()!"
> +	fi
> +

What happens if an ebuild calls eapply_user in src_unpack but not
in src_prepare?

Ulrich

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

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

* Re: [gentoo-portage-dev] [PATCH] EAPI 6: Fail if eapply_user is not called in src_prepare()
  2015-11-18  7:01 ` Ulrich Mueller
  2015-11-18  7:03   ` Michał Górny
@ 2015-11-18  7:03   ` Michał Górny
  2015-11-18  7:12   ` Zac Medico
  2 siblings, 0 replies; 7+ messages in thread
From: Michał Górny @ 2015-11-18  7:03 UTC (permalink / raw
  To: gentoo-portage-dev, Ulrich Mueller

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512



Dnia 18 listopada 2015 08:01:06 CET, Ulrich Mueller <ulm@gentoo.org> napisał(a):
>>>>>> On Tue, 17 Nov 2015, Michał Górny wrote:
>
>>  	__ebuild_phase src_prepare
>> +
>> +	# keep path in eapply_user in sync!
>> +	if [[ ! -f ${T}/.portage_user_patches_applied ]]; then
>> +		die "eapply_user (or default) must be called in src_prepare()!"
>> +	fi
>> +
>
>What happens if an ebuild calls eapply_user in src_unpack but not
>in src_prepare?

The temporary file is preserved, so nothing special.

>
>Ulrich

- --
Best regards,
Michał Górny
-----BEGIN PGP SIGNATURE-----

iQJJBAEBCgAzLBxNaWNoYcWCIEfDs3JueSAoR2VudG9vKSA8bWdvcm55QGdlbnRv
by5vcmc+BQJWTCKhAAoJELB6GurvtEZOPWkP/3VpuQXC73uZZUCYdtjpVp77iLld
nnJ9zhezNTcx4M2gXOntPo032wOpSReGLoHvON3Vlef3z5KXGBOkuQo0X5dX2vaC
vUm7qfpkTF5LtXfDh16yhkx8kQ7yr6ECSWF9+HwFoIrjlYkDp4Bhi+5nRm6421Q/
OhffC4CpzMk3VBLmRJ+JJjKsf3yN2qS/AxnknOMSQuMJ4NG6ltXUTm7IwSiTN2IM
QCeye0s/1kdhvj/cqWXQJqzwmRs6XSBKpaBdkrb11UG0lp7yA4WHFaJVgP+ZMgYA
0JUPLmStkUONGpIogEbacHcaDdHGq7u+zn2mss0talowY4VecykEZR0PrR6+W+xm
Q+bBELQoMudkSDDU5Pcn4h9/899eZujk9PbucA392mbRUPiQ46GPGp6SkXy9fHKR
Kzzi08ZjzS+TuFaooKle38rMGqhyXu+qVFxtbyyEE/CWNsOMAws64MS+msBzGYeK
GEyDW8vmFUFtEi40U58mr809Rhq0J69t2Smwqsdg8xfnlvr4ZHxODV6EVZuesXxV
JOJsnWnO2Nvzca70wgy0ZefU6QJuWcFAFJRa7QLvDzalz+zxvNZPE9rPfoCVO/ng
SGdHkqeKg7LepTBssyYUCFwn0txitCczR87a++z1Pd3r3YsK7qeQomK+WFH9WijL
NZauYg6oIFS0cOEk
=p1Ck
-----END PGP SIGNATURE-----



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

* Re: [gentoo-portage-dev] [PATCH] EAPI 6: Fail if eapply_user is not called in src_prepare()
  2015-11-18  7:01 ` Ulrich Mueller
@ 2015-11-18  7:03   ` Michał Górny
  2015-11-18  7:03   ` Michał Górny
  2015-11-18  7:12   ` Zac Medico
  2 siblings, 0 replies; 7+ messages in thread
From: Michał Górny @ 2015-11-18  7:03 UTC (permalink / raw
  To: gentoo-portage-dev, Ulrich Mueller

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512



Dnia 18 listopada 2015 08:01:06 CET, Ulrich Mueller <ulm@gentoo.org> napisał(a):
>>>>>> On Tue, 17 Nov 2015, Michał Górny wrote:
>
>>  	__ebuild_phase src_prepare
>> +
>> +	# keep path in eapply_user in sync!
>> +	if [[ ! -f ${T}/.portage_user_patches_applied ]]; then
>> +		die "eapply_user (or default) must be called in src_prepare()!"
>> +	fi
>> +
>
>What happens if an ebuild calls eapply_user in src_unpack but not
>in src_prepare?

The temporary file is preserved, so nothing special.

>
>Ulrich

- --
Best regards,
Michał Górny
-----BEGIN PGP SIGNATURE-----

iQJJBAEBCgAzLBxNaWNoYcWCIEfDs3JueSAoR2VudG9vKSA8bWdvcm55QGdlbnRv
by5vcmc+BQJWTCKhAAoJELB6GurvtEZOPWkP/3VpuQXC73uZZUCYdtjpVp77iLld
nnJ9zhezNTcx4M2gXOntPo032wOpSReGLoHvON3Vlef3z5KXGBOkuQo0X5dX2vaC
vUm7qfpkTF5LtXfDh16yhkx8kQ7yr6ECSWF9+HwFoIrjlYkDp4Bhi+5nRm6421Q/
OhffC4CpzMk3VBLmRJ+JJjKsf3yN2qS/AxnknOMSQuMJ4NG6ltXUTm7IwSiTN2IM
QCeye0s/1kdhvj/cqWXQJqzwmRs6XSBKpaBdkrb11UG0lp7yA4WHFaJVgP+ZMgYA
0JUPLmStkUONGpIogEbacHcaDdHGq7u+zn2mss0talowY4VecykEZR0PrR6+W+xm
Q+bBELQoMudkSDDU5Pcn4h9/899eZujk9PbucA392mbRUPiQ46GPGp6SkXy9fHKR
Kzzi08ZjzS+TuFaooKle38rMGqhyXu+qVFxtbyyEE/CWNsOMAws64MS+msBzGYeK
GEyDW8vmFUFtEi40U58mr809Rhq0J69t2Smwqsdg8xfnlvr4ZHxODV6EVZuesXxV
JOJsnWnO2Nvzca70wgy0ZefU6QJuWcFAFJRa7QLvDzalz+zxvNZPE9rPfoCVO/ng
SGdHkqeKg7LepTBssyYUCFwn0txitCczR87a++z1Pd3r3YsK7qeQomK+WFH9WijL
NZauYg6oIFS0cOEk
=p1Ck
-----END PGP SIGNATURE-----



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

* Re: [gentoo-portage-dev] [PATCH] EAPI 6: Fail if eapply_user is not called in src_prepare()
  2015-11-18  7:01 ` Ulrich Mueller
  2015-11-18  7:03   ` Michał Górny
  2015-11-18  7:03   ` Michał Górny
@ 2015-11-18  7:12   ` Zac Medico
  2015-11-18  7:29     ` Ulrich Mueller
  2 siblings, 1 reply; 7+ messages in thread
From: Zac Medico @ 2015-11-18  7:12 UTC (permalink / raw
  To: gentoo-portage-dev; +Cc: Michał Górny

On 11/17/2015 11:01 PM, Ulrich Mueller wrote:
>>>>>> On Tue, 17 Nov 2015, Michał Górny wrote:
> 
>>  	__ebuild_phase src_prepare
>> +
>> +	# keep path in eapply_user in sync!
>> +	if [[ ! -f ${T}/.portage_user_patches_applied ]]; then
>> +		die "eapply_user (or default) must be called in src_prepare()!"
>> +	fi
>> +
> 
> What happens if an ebuild calls eapply_user in src_unpack but not
> in src_prepare?

It will succeed in that case.

If necessary, we can make eapply_user die if it's called during the
wrong phase.

> 
> Ulrich
> 
-- 
Thanks,
Zac


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

* Re: [gentoo-portage-dev] [PATCH] EAPI 6: Fail if eapply_user is not called in src_prepare()
  2015-11-18  7:12   ` Zac Medico
@ 2015-11-18  7:29     ` Ulrich Mueller
  0 siblings, 0 replies; 7+ messages in thread
From: Ulrich Mueller @ 2015-11-18  7:29 UTC (permalink / raw
  To: gentoo-portage-dev; +Cc: Michał Górny

[-- Attachment #1: Type: text/plain, Size: 408 bytes --]

>>>>> On Tue, 17 Nov 2015, Zac Medico wrote:

>> What happens if an ebuild calls eapply_user in src_unpack but not
>> in src_prepare?

> It will succeed in that case.

It should die if it isn't called in src_prepare.

> If necessary, we can make eapply_user die if it's called during the
> wrong phase.

That's not really mandated by the spec, but I think such extra
strictness would be a good idea.

Ulrich

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

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

end of thread, other threads:[~2015-11-18  7:29 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-17 22:20 [gentoo-portage-dev] [PATCH] EAPI 6: Fail if eapply_user is not called in src_prepare() Michał Górny
2015-11-17 23:32 ` Zac Medico
2015-11-18  7:01 ` Ulrich Mueller
2015-11-18  7:03   ` Michał Górny
2015-11-18  7:03   ` Michał Górny
2015-11-18  7:12   ` Zac Medico
2015-11-18  7:29     ` Ulrich Mueller

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