public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCH] subversion.eclass: support for EAPI 6
@ 2016-07-29 15:31 Andrew Savchenko
  2016-07-29 15:42 ` Michał Górny
  0 siblings, 1 reply; 8+ messages in thread
From: Andrew Savchenko @ 2016-07-29 15:31 UTC (permalink / raw)
  To: gentoo-dev


[-- Attachment #1.1: Type: text/plain, Size: 258 bytes --]

Hello,

subversion eclass can't be used in EAPI 6 ebuilds, since it lacks
eapply_user call in src_prepare(), otherwise it looks fine for
EAPI 6 and works here fine.

This patch adds eapply_user for EAPI 6 and later.

Best regards,
Andrew Savchenko

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: subversion.eclass.patch --]
[-- Type: text/x-diff; name="subversion.eclass.patch", Size: 451 bytes --]

diff --git a/eclass/subversion.eclass b/eclass/subversion.eclass
index c45c725..49040a4 100644
--- a/eclass/subversion.eclass
+++ b/eclass/subversion.eclass
@@ -434,6 +434,7 @@ subversion_src_unpack() {
 # Default src_prepare. Bootstrap.
 subversion_src_prepare() {
 	subversion_bootstrap || die "${ESVN}: unknown problem occurred in subversion_bootstrap."
+	[[ ${EAPI:-0} -ge 6 ]] && eapply_user
 }
 
 # @FUNCTION: subversion_pkg_preinst

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

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

* Re: [gentoo-dev] [PATCH] subversion.eclass: support for EAPI 6
  2016-07-29 15:31 [gentoo-dev] [PATCH] subversion.eclass: support for EAPI 6 Andrew Savchenko
@ 2016-07-29 15:42 ` Michał Górny
  2016-07-29 19:36   ` Andrew Savchenko
  0 siblings, 1 reply; 8+ messages in thread
From: Michał Górny @ 2016-07-29 15:42 UTC (permalink / raw)
  To: Andrew Savchenko; +Cc: gentoo-dev

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

On Fri, 29 Jul 2016 18:31:58 +0300
Andrew Savchenko <bircoph@gentoo.org> wrote:

> diff --git a/eclass/subversion.eclass b/eclass/subversion.eclass
> index c45c725..49040a4 100644
> --- a/eclass/subversion.eclass
> +++ b/eclass/subversion.eclass
> @@ -434,6 +434,7 @@ subversion_src_unpack() {
>  # Default src_prepare. Bootstrap.
>  subversion_src_prepare() {
>  	subversion_bootstrap || die "${ESVN}: unknown problem occurred in subversion_bootstrap."
> +	[[ ${EAPI:-0} -ge 6 ]] && eapply_user

EAPI is not always a number, so this is wrong.

Furthermore, since it didn't work in EAPI 6 anyway, please take a look
into improving this eclass for EAPI 6. In particular:

- add a proper EAPI check preventing it from implicitly being enabled
  in new EAPIs,

- disable subversion_bootstrap() along with all the relevant facilities
  in EAPI 6 and later, therefore also stopping exporting src_prepare().

-- 
Best regards,
Michał Górny
<http://dev.gentoo.org/~mgorny/>

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 949 bytes --]

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

* Re: [gentoo-dev] [PATCH] subversion.eclass: support for EAPI 6
  2016-07-29 15:42 ` Michał Górny
@ 2016-07-29 19:36   ` Andrew Savchenko
  2016-07-30  5:37     ` Michał Górny
  0 siblings, 1 reply; 8+ messages in thread
From: Andrew Savchenko @ 2016-07-29 19:36 UTC (permalink / raw)
  To: gentoo-dev


[-- Attachment #1.1: Type: text/plain, Size: 1562 bytes --]

On Fri, 29 Jul 2016 17:42:40 +0200 Michał Górny wrote:
> On Fri, 29 Jul 2016 18:31:58 +0300
> Andrew Savchenko <bircoph@gentoo.org> wrote:
> 
> > diff --git a/eclass/subversion.eclass b/eclass/subversion.eclass
> > index c45c725..49040a4 100644
> > --- a/eclass/subversion.eclass
> > +++ b/eclass/subversion.eclass
> > @@ -434,6 +434,7 @@ subversion_src_unpack() {
> >  # Default src_prepare. Bootstrap.
> >  subversion_src_prepare() {
> >  	subversion_bootstrap || die "${ESVN}: unknown problem occurred in subversion_bootstrap."
> > +	[[ ${EAPI:-0} -ge 6 ]] && eapply_user
> 
> EAPI is not always a number, so this is wrong.

Then as QA you should go and fix xorg-2.eclass :)

Due to changes below this code is not needed in the
subversion.eclass.

> Furthermore, since it didn't work in EAPI 6 anyway, please take a look
> into improving this eclass for EAPI 6. In particular:
> 
> - add a proper EAPI check preventing it from implicitly being enabled
>   in new EAPIs,

Done.
 
> - disable subversion_bootstrap() along with all the relevant facilities
>   in EAPI 6 and later, therefore also stopping exporting src_prepare().

Done, no need for eappy_user in this case.

Please in future explain such requirements to save fellow
developer's time, since subversion_bootstrap doesn't contradict
directly with EAPI 6 (ESVN_PATCHES is not needed with PATCHES
available in EAPI 6, but this is another matter). The real reason
for removal is that nobody uses it in the main tree anymore.

Best regards,
Andrew Savchenko

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: subversion.eclass.patch --]
[-- Type: text/x-diff; name="subversion.eclass.patch", Size: 2207 bytes --]

diff --git a/eclass/subversion.eclass b/eclass/subversion.eclass
index c45c725..489e448 100644
--- a/eclass/subversion.eclass
+++ b/eclass/subversion.eclass
@@ -21,10 +21,17 @@ case "${EAPI:-0}" in
 		EXPORT_FUNCTIONS src_unpack pkg_preinst
 		DEPEND="dev-vcs/subversion"
 		;;
-	*)
+	2|3|4|5)
 		EXPORT_FUNCTIONS src_unpack src_prepare pkg_preinst
 		DEPEND="|| ( dev-vcs/subversion[http] dev-vcs/subversion[webdav-neon] dev-vcs/subversion[webdav-serf] )"
 		;;
+	6)
+		EXPORT_FUNCTIONS src_unpack pkg_preinst
+		DEPEND="|| ( dev-vcs/subversion[http] dev-vcs/subversion[webdav-neon] dev-vcs/subversion[webdav-serf] )"
+		;;
+	*)
+		die "EAPI ${EAPI} is not supported in subversion.eclass"
+		;;
 esac
 
 DEPEND+=" net-misc/rsync"
@@ -116,7 +123,8 @@ ESVN_PROJECT="${ESVN_PROJECT:-${PN/-svn}}"
 
 # @ECLASS-VARIABLE: ESVN_BOOTSTRAP
 # @DESCRIPTION:
-# bootstrap script or command like autogen.sh or etc..
+# Bootstrap script or command like autogen.sh or etc..
+# Removed in EAPI 6 and later.
 ESVN_BOOTSTRAP="${ESVN_BOOTSTRAP:-}"
 
 # @ECLASS-VARIABLE: ESVN_PATCHES
@@ -127,6 +135,8 @@ ESVN_BOOTSTRAP="${ESVN_BOOTSTRAP:-}"
 #
 # Patches are searched both in ${PWD} and ${FILESDIR}, if not found in either
 # location, the installation dies.
+#
+# Removed in EAPI 6 and later, use PATCHES instead.
 ESVN_PATCHES="${ESVN_PATCHES:-}"
 
 # @ECLASS-VARIABLE: ESVN_RESTRICT
@@ -355,7 +365,10 @@ subversion_fetch() {
 # @FUNCTION: subversion_bootstrap
 # @DESCRIPTION:
 # Apply patches in ${ESVN_PATCHES} and run ${ESVN_BOOTSTRAP} if specified.
+# Removed in EAPI 6 and later.
 subversion_bootstrap() {
+	has "${EAPI:-0}" 6 && die "${FUNCNAME[1]} is removed from subversion.eclass in EAPI 6 and later"
+
 	if has "export" ${ESVN_RESTRICT}; then
 		return
 	fi
@@ -432,7 +445,9 @@ subversion_src_unpack() {
 # @FUNCTION: subversion_src_prepare
 # @DESCRIPTION:
 # Default src_prepare. Bootstrap.
+# Removed in EAPI 6 and later.
 subversion_src_prepare() {
+	has "${EAPI:-0}" 6 && die "${FUNCNAME[1]} is removed from subversion.eclass in EAPI 6 and later"
 	subversion_bootstrap || die "${ESVN}: unknown problem occurred in subversion_bootstrap."
 }
 

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

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

* Re: [gentoo-dev] [PATCH] subversion.eclass: support for EAPI 6
  2016-07-29 19:36   ` Andrew Savchenko
@ 2016-07-30  5:37     ` Michał Górny
  2016-07-30  9:34       ` Andrew Savchenko
  0 siblings, 1 reply; 8+ messages in thread
From: Michał Górny @ 2016-07-30  5:37 UTC (permalink / raw)
  To: Andrew Savchenko; +Cc: gentoo-dev

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

On Fri, 29 Jul 2016 22:36:01 +0300
Andrew Savchenko <bircoph@gentoo.org> wrote:

> diff --git a/eclass/subversion.eclass b/eclass/subversion.eclass
> index c45c725..489e448 100644
> --- a/eclass/subversion.eclass
> +++ b/eclass/subversion.eclass
> @@ -21,10 +21,17 @@ case "${EAPI:-0}" in
>  		EXPORT_FUNCTIONS src_unpack pkg_preinst
>  		DEPEND="dev-vcs/subversion"
>  		;;
> -	*)
> +	2|3|4|5)
>  		EXPORT_FUNCTIONS src_unpack src_prepare pkg_preinst
>  		DEPEND="|| ( dev-vcs/subversion[http] dev-vcs/subversion[webdav-neon] dev-vcs/subversion[webdav-serf] )"
>  		;;
> +	6)
> +		EXPORT_FUNCTIONS src_unpack pkg_preinst
> +		DEPEND="|| ( dev-vcs/subversion[http] dev-vcs/subversion[webdav-neon] dev-vcs/subversion[webdav-serf] )"
> +		;;
> +	*)
> +		die "EAPI ${EAPI} is not supported in subversion.eclass"
> +		;;
>  esac
>  
>  DEPEND+=" net-misc/rsync"
> @@ -116,7 +123,8 @@ ESVN_PROJECT="${ESVN_PROJECT:-${PN/-svn}}"
>  
>  # @ECLASS-VARIABLE: ESVN_BOOTSTRAP
>  # @DESCRIPTION:
> -# bootstrap script or command like autogen.sh or etc..
> +# Bootstrap script or command like autogen.sh or etc..
> +# Removed in EAPI 6 and later.
>  ESVN_BOOTSTRAP="${ESVN_BOOTSTRAP:-}"
>  
>  # @ECLASS-VARIABLE: ESVN_PATCHES
> @@ -127,6 +135,8 @@ ESVN_BOOTSTRAP="${ESVN_BOOTSTRAP:-}"
>  #
>  # Patches are searched both in ${PWD} and ${FILESDIR}, if not found in either
>  # location, the installation dies.
> +#
> +# Removed in EAPI 6 and later, use PATCHES instead.
>  ESVN_PATCHES="${ESVN_PATCHES:-}"

It would be a good idea to check if the variables are set and die if
they are, so people don't accidentally use them.

>  
>  # @ECLASS-VARIABLE: ESVN_RESTRICT
> @@ -355,7 +365,10 @@ subversion_fetch() {
>  # @FUNCTION: subversion_bootstrap
>  # @DESCRIPTION:
>  # Apply patches in ${ESVN_PATCHES} and run ${ESVN_BOOTSTRAP} if specified.
> +# Removed in EAPI 6 and later.
>  subversion_bootstrap() {
> +	has "${EAPI:-0}" 6 && die "${FUNCNAME[1]} is removed from subversion.eclass in EAPI 6 and later"
> +

Reverse the logic. This will require updating in every EAPI while it is
rather unlikely the next EAPIs will return to previous behavior.

>  	if has "export" ${ESVN_RESTRICT}; then
>  		return
>  	fi
> @@ -432,7 +445,9 @@ subversion_src_unpack() {
>  # @FUNCTION: subversion_src_prepare
>  # @DESCRIPTION:
>  # Default src_prepare. Bootstrap.
> +# Removed in EAPI 6 and later.
>  subversion_src_prepare() {
> +	has "${EAPI:-0}" 6 && die "${FUNCNAME[1]} is removed from subversion.eclass in EAPI 6 and later"
>  	subversion_bootstrap || die "${ESVN}: unknown problem occurred in subversion_bootstrap."
>  }
>  



-- 
Best regards,
Michał Górny
<http://dev.gentoo.org/~mgorny/>

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 949 bytes --]

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

* Re: [gentoo-dev] [PATCH] subversion.eclass: support for EAPI 6
  2016-07-30  5:37     ` Michał Górny
@ 2016-07-30  9:34       ` Andrew Savchenko
  2016-08-06 14:05         ` Andrew Savchenko
  0 siblings, 1 reply; 8+ messages in thread
From: Andrew Savchenko @ 2016-07-30  9:34 UTC (permalink / raw)
  To: gentoo-dev


[-- Attachment #1.1: Type: text/plain, Size: 1852 bytes --]

On Sat, 30 Jul 2016 07:37:08 +0200 Michał Górny wrote:
> > @@ -116,7 +123,8 @@ ESVN_PROJECT="${ESVN_PROJECT:-${PN/-svn}}"
> >  
> >  # @ECLASS-VARIABLE: ESVN_BOOTSTRAP
> >  # @DESCRIPTION:
> > -# bootstrap script or command like autogen.sh or etc..
> > +# Bootstrap script or command like autogen.sh or etc..
> > +# Removed in EAPI 6 and later.
> >  ESVN_BOOTSTRAP="${ESVN_BOOTSTRAP:-}"
> >  
> >  # @ECLASS-VARIABLE: ESVN_PATCHES
> > @@ -127,6 +135,8 @@ ESVN_BOOTSTRAP="${ESVN_BOOTSTRAP:-}"
> >  #
> >  # Patches are searched both in ${PWD} and ${FILESDIR}, if not found in either
> >  # location, the installation dies.
> > +#
> > +# Removed in EAPI 6 and later, use PATCHES instead.
> >  ESVN_PATCHES="${ESVN_PATCHES:-}"
> 
> It would be a good idea to check if the variables are set and die if
> they are, so people don't accidentally use them.

Impossible to implement. These variables (as well as all other
ESVN_* variables) are usually set after subversion eclass is
inherited. And even if I'll duplicate this check in all available
functions (which is ridiculous by itself), it still will not help,
since several functions are removed from EAPI 6 and people may
rely on default behaviour of src_prepare() alone.

> >  # @ECLASS-VARIABLE: ESVN_RESTRICT
> > @@ -355,7 +365,10 @@ subversion_fetch() {
> >  # @FUNCTION: subversion_bootstrap
> >  # @DESCRIPTION:
> >  # Apply patches in ${ESVN_PATCHES} and run ${ESVN_BOOTSTRAP} if specified.
> > +# Removed in EAPI 6 and later.
> >  subversion_bootstrap() {
> > +	has "${EAPI:-0}" 6 && die "${FUNCNAME[1]} is removed from subversion.eclass in EAPI 6 and later"
> > +
> 
> Reverse the logic. This will require updating in every EAPI while it is
> rather unlikely the next EAPIs will return to previous behavior.

Done.

Best regards,
Andrew Savchenko

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: subversion.eclass.patch --]
[-- Type: text/x-diff; name="subversion.eclass.patch", Size: 2221 bytes --]

diff --git a/eclass/subversion.eclass b/eclass/subversion.eclass
index c45c725..766c3f7 100644
--- a/eclass/subversion.eclass
+++ b/eclass/subversion.eclass
@@ -21,10 +21,17 @@ case "${EAPI:-0}" in
 		EXPORT_FUNCTIONS src_unpack pkg_preinst
 		DEPEND="dev-vcs/subversion"
 		;;
-	*)
+	2|3|4|5)
 		EXPORT_FUNCTIONS src_unpack src_prepare pkg_preinst
 		DEPEND="|| ( dev-vcs/subversion[http] dev-vcs/subversion[webdav-neon] dev-vcs/subversion[webdav-serf] )"
 		;;
+	6)
+		EXPORT_FUNCTIONS src_unpack pkg_preinst
+		DEPEND="|| ( dev-vcs/subversion[http] dev-vcs/subversion[webdav-neon] dev-vcs/subversion[webdav-serf] )"
+		;;
+	*)
+		die "EAPI ${EAPI} is not supported in subversion.eclass"
+		;;
 esac
 
 DEPEND+=" net-misc/rsync"
@@ -116,7 +123,8 @@ ESVN_PROJECT="${ESVN_PROJECT:-${PN/-svn}}"
 
 # @ECLASS-VARIABLE: ESVN_BOOTSTRAP
 # @DESCRIPTION:
-# bootstrap script or command like autogen.sh or etc..
+# Bootstrap script or command like autogen.sh or etc..
+# Removed in EAPI 6 and later.
 ESVN_BOOTSTRAP="${ESVN_BOOTSTRAP:-}"
 
 # @ECLASS-VARIABLE: ESVN_PATCHES
@@ -127,6 +135,8 @@ ESVN_BOOTSTRAP="${ESVN_BOOTSTRAP:-}"
 #
 # Patches are searched both in ${PWD} and ${FILESDIR}, if not found in either
 # location, the installation dies.
+#
+# Removed in EAPI 6 and later, use PATCHES instead.
 ESVN_PATCHES="${ESVN_PATCHES:-}"
 
 # @ECLASS-VARIABLE: ESVN_RESTRICT
@@ -355,7 +365,10 @@ subversion_fetch() {
 # @FUNCTION: subversion_bootstrap
 # @DESCRIPTION:
 # Apply patches in ${ESVN_PATCHES} and run ${ESVN_BOOTSTRAP} if specified.
+# Removed in EAPI 6 and later.
 subversion_bootstrap() {
+	[[ ${EAPI} == [012345] ]] || die "${FUNCNAME[1]} is removed from subversion.eclass in EAPI 6 and later"
+
 	if has "export" ${ESVN_RESTRICT}; then
 		return
 	fi
@@ -432,7 +445,9 @@ subversion_src_unpack() {
 # @FUNCTION: subversion_src_prepare
 # @DESCRIPTION:
 # Default src_prepare. Bootstrap.
+# Removed in EAPI 6 and later.
 subversion_src_prepare() {
+	[[ ${EAPI} == [012345] ]] || die "${FUNCNAME[1]} is removed from subversion.eclass in EAPI 6 and later"
 	subversion_bootstrap || die "${ESVN}: unknown problem occurred in subversion_bootstrap."
 }
 

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

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

* Re: [gentoo-dev] [PATCH] subversion.eclass: support for EAPI 6
  2016-07-30  9:34       ` Andrew Savchenko
@ 2016-08-06 14:05         ` Andrew Savchenko
  2016-08-20 16:42           ` Raymond Jennings
  0 siblings, 1 reply; 8+ messages in thread
From: Andrew Savchenko @ 2016-08-06 14:05 UTC (permalink / raw)
  To: gentoo-dev

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

Hi,

On Sat, 30 Jul 2016 12:34:07 +0300 Andrew Savchenko wrote:
> On Sat, 30 Jul 2016 07:37:08 +0200 Michał Górny wrote:
> > > @@ -116,7 +123,8 @@ ESVN_PROJECT="${ESVN_PROJECT:-${PN/-svn}}"
> > >  
> > >  # @ECLASS-VARIABLE: ESVN_BOOTSTRAP
> > >  # @DESCRIPTION:
> > > -# bootstrap script or command like autogen.sh or etc..
> > > +# Bootstrap script or command like autogen.sh or etc..
> > > +# Removed in EAPI 6 and later.
> > >  ESVN_BOOTSTRAP="${ESVN_BOOTSTRAP:-}"
> > >  
> > >  # @ECLASS-VARIABLE: ESVN_PATCHES
> > > @@ -127,6 +135,8 @@ ESVN_BOOTSTRAP="${ESVN_BOOTSTRAP:-}"
> > >  #
> > >  # Patches are searched both in ${PWD} and ${FILESDIR}, if not found in either
> > >  # location, the installation dies.
> > > +#
> > > +# Removed in EAPI 6 and later, use PATCHES instead.
> > >  ESVN_PATCHES="${ESVN_PATCHES:-}"
> > 
> > It would be a good idea to check if the variables are set and die if
> > they are, so people don't accidentally use them.
> 
> Impossible to implement. These variables (as well as all other
> ESVN_* variables) are usually set after subversion eclass is
> inherited. And even if I'll duplicate this check in all available
> functions (which is ridiculous by itself), it still will not help,
> since several functions are removed from EAPI 6 and people may
> rely on default behaviour of src_prepare() alone.
> 
> > >  # @ECLASS-VARIABLE: ESVN_RESTRICT
> > > @@ -355,7 +365,10 @@ subversion_fetch() {
> > >  # @FUNCTION: subversion_bootstrap
> > >  # @DESCRIPTION:
> > >  # Apply patches in ${ESVN_PATCHES} and run ${ESVN_BOOTSTRAP} if specified.
> > > +# Removed in EAPI 6 and later.
> > >  subversion_bootstrap() {
> > > +	has "${EAPI:-0}" 6 && die "${FUNCNAME[1]} is removed from subversion.eclass in EAPI 6 and later"
> > > +
> > 
> > Reverse the logic. This will require updating in every EAPI while it is
> > rather unlikely the next EAPIs will return to previous behavior.
> 
> Done.

No further comments for a week => in the tree now.
Thank you for review.

Best regards,
Andrew Savchenko

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

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

* Re: [gentoo-dev] [PATCH] subversion.eclass: support for EAPI 6
  2016-08-06 14:05         ` Andrew Savchenko
@ 2016-08-20 16:42           ` Raymond Jennings
  2016-08-22 13:26             ` Andrew Savchenko
  0 siblings, 1 reply; 8+ messages in thread
From: Raymond Jennings @ 2016-08-20 16:42 UTC (permalink / raw)
  To: gentoo-dev

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

Just an FYI, games-emulation/dosbox tripped over this recently.

On Sat, Aug 6, 2016 at 7:05 AM, Andrew Savchenko <bircoph@gentoo.org> wrote:

> Hi,
>
> On Sat, 30 Jul 2016 12:34:07 +0300 Andrew Savchenko wrote:
> > On Sat, 30 Jul 2016 07:37:08 +0200 Michał Górny wrote:
> > > > @@ -116,7 +123,8 @@ ESVN_PROJECT="${ESVN_PROJECT:-${PN/-svn}}"
> > > >
> > > >  # @ECLASS-VARIABLE: ESVN_BOOTSTRAP
> > > >  # @DESCRIPTION:
> > > > -# bootstrap script or command like autogen.sh or etc..
> > > > +# Bootstrap script or command like autogen.sh or etc..
> > > > +# Removed in EAPI 6 and later.
> > > >  ESVN_BOOTSTRAP="${ESVN_BOOTSTRAP:-}"
> > > >
> > > >  # @ECLASS-VARIABLE: ESVN_PATCHES
> > > > @@ -127,6 +135,8 @@ ESVN_BOOTSTRAP="${ESVN_BOOTSTRAP:-}"
> > > >  #
> > > >  # Patches are searched both in ${PWD} and ${FILESDIR}, if not found
> in either
> > > >  # location, the installation dies.
> > > > +#
> > > > +# Removed in EAPI 6 and later, use PATCHES instead.
> > > >  ESVN_PATCHES="${ESVN_PATCHES:-}"
> > >
> > > It would be a good idea to check if the variables are set and die if
> > > they are, so people don't accidentally use them.
> >
> > Impossible to implement. These variables (as well as all other
> > ESVN_* variables) are usually set after subversion eclass is
> > inherited. And even if I'll duplicate this check in all available
> > functions (which is ridiculous by itself), it still will not help,
> > since several functions are removed from EAPI 6 and people may
> > rely on default behaviour of src_prepare() alone.
> >
> > > >  # @ECLASS-VARIABLE: ESVN_RESTRICT
> > > > @@ -355,7 +365,10 @@ subversion_fetch() {
> > > >  # @FUNCTION: subversion_bootstrap
> > > >  # @DESCRIPTION:
> > > >  # Apply patches in ${ESVN_PATCHES} and run ${ESVN_BOOTSTRAP} if
> specified.
> > > > +# Removed in EAPI 6 and later.
> > > >  subversion_bootstrap() {
> > > > + has "${EAPI:-0}" 6 && die "${FUNCNAME[1]} is removed from
> subversion.eclass in EAPI 6 and later"
> > > > +
> > >
> > > Reverse the logic. This will require updating in every EAPI while it is
> > > rather unlikely the next EAPIs will return to previous behavior.
> >
> > Done.
>
> No further comments for a week => in the tree now.
> Thank you for review.
>
> Best regards,
> Andrew Savchenko
>

[-- Attachment #2: Type: text/html, Size: 3165 bytes --]

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

* Re: [gentoo-dev] [PATCH] subversion.eclass: support for EAPI 6
  2016-08-20 16:42           ` Raymond Jennings
@ 2016-08-22 13:26             ` Andrew Savchenko
  0 siblings, 0 replies; 8+ messages in thread
From: Andrew Savchenko @ 2016-08-22 13:26 UTC (permalink / raw)
  To: gentoo-dev

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

On Sat, 20 Aug 2016 09:42:51 -0700 Raymond Jennings wrote:
> Just an FYI, games-emulation/dosbox tripped over this recently.

It should not call subversion_src_prepare() in EAPI 6 ebuild.
Please file a bug for this issue for dosbox maintainers. I can't
help you here.

> On Sat, Aug 6, 2016 at 7:05 AM, Andrew Savchenko <bircoph@gentoo.org> wrote:
> 
> > Hi,
> >
> > On Sat, 30 Jul 2016 12:34:07 +0300 Andrew Savchenko wrote:
> > > On Sat, 30 Jul 2016 07:37:08 +0200 Michał Górny wrote:
> > > > > @@ -116,7 +123,8 @@ ESVN_PROJECT="${ESVN_PROJECT:-${PN/-svn}}"
> > > > >
> > > > >  # @ECLASS-VARIABLE: ESVN_BOOTSTRAP
> > > > >  # @DESCRIPTION:
> > > > > -# bootstrap script or command like autogen.sh or etc..
> > > > > +# Bootstrap script or command like autogen.sh or etc..
> > > > > +# Removed in EAPI 6 and later.
> > > > >  ESVN_BOOTSTRAP="${ESVN_BOOTSTRAP:-}"
> > > > >
> > > > >  # @ECLASS-VARIABLE: ESVN_PATCHES
> > > > > @@ -127,6 +135,8 @@ ESVN_BOOTSTRAP="${ESVN_BOOTSTRAP:-}"
> > > > >  #
> > > > >  # Patches are searched both in ${PWD} and ${FILESDIR}, if not found
> > in either
> > > > >  # location, the installation dies.
> > > > > +#
> > > > > +# Removed in EAPI 6 and later, use PATCHES instead.
> > > > >  ESVN_PATCHES="${ESVN_PATCHES:-}"
> > > >
> > > > It would be a good idea to check if the variables are set and die if
> > > > they are, so people don't accidentally use them.
> > >
> > > Impossible to implement. These variables (as well as all other
> > > ESVN_* variables) are usually set after subversion eclass is
> > > inherited. And even if I'll duplicate this check in all available
> > > functions (which is ridiculous by itself), it still will not help,
> > > since several functions are removed from EAPI 6 and people may
> > > rely on default behaviour of src_prepare() alone.
> > >
> > > > >  # @ECLASS-VARIABLE: ESVN_RESTRICT
> > > > > @@ -355,7 +365,10 @@ subversion_fetch() {
> > > > >  # @FUNCTION: subversion_bootstrap
> > > > >  # @DESCRIPTION:
> > > > >  # Apply patches in ${ESVN_PATCHES} and run ${ESVN_BOOTSTRAP} if
> > specified.
> > > > > +# Removed in EAPI 6 and later.
> > > > >  subversion_bootstrap() {
> > > > > + has "${EAPI:-0}" 6 && die "${FUNCNAME[1]} is removed from
> > subversion.eclass in EAPI 6 and later"
> > > > > +
> > > >
> > > > Reverse the logic. This will require updating in every EAPI while it is
> > > > rather unlikely the next EAPIs will return to previous behavior.
> > >
> > > Done.
> >
> > No further comments for a week => in the tree now.
> > Thank you for review.
> >
> > Best regards,
> > Andrew Savchenko
> >


Best regards,
Andrew Savchenko

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

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

end of thread, other threads:[~2016-08-22 13:27 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-29 15:31 [gentoo-dev] [PATCH] subversion.eclass: support for EAPI 6 Andrew Savchenko
2016-07-29 15:42 ` Michał Górny
2016-07-29 19:36   ` Andrew Savchenko
2016-07-30  5:37     ` Michał Górny
2016-07-30  9:34       ` Andrew Savchenko
2016-08-06 14:05         ` Andrew Savchenko
2016-08-20 16:42           ` Raymond Jennings
2016-08-22 13:26             ` Andrew Savchenko

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