public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Andrew Savchenko <bircoph@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] [PATCH] subversion.eclass: support for EAPI 6
Date: Fri, 29 Jul 2016 22:36:01 +0300	[thread overview]
Message-ID: <20160729223601.b66b48bb392db1cb391f5049@gentoo.org> (raw)
In-Reply-To: <20160729174241.337d0793.mgorny@gentoo.org>


[-- 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 --]

  reply	other threads:[~2016-07-29 19:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160729223601.b66b48bb392db1cb391f5049@gentoo.org \
    --to=bircoph@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox