[PATCH] ant-tasks.eclass: use eapi7-ver

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] ant-tasks.eclass: use eapi7-ver

Marty E. Plummer
See also https://github.com/gentoo/gentoo/pull/8325
The above pr does a revbump and bumps EAPI to 6 for every ebuild which
uses this eclass. If we were to instead just in-place bump EAPI to 6 we
could do away with the conditional code entirely.

Package-Manager: Portage-2.3.36, Repoman-2.3.9
---
 eclass/ant-tasks.eclass | 22 +++++++++++++++++-----
 1 file changed, 17 insertions(+), 5 deletions(-)

diff --git a/eclass/ant-tasks.eclass b/eclass/ant-tasks.eclass
index e008e6eaea8..193d6af0c04 100644
--- a/eclass/ant-tasks.eclass
+++ b/eclass/ant-tasks.eclass
@@ -16,7 +16,19 @@
 JAVA_ANT_DISABLE_ANT_CORE_DEP=true
 # rewriting build.xml for are the testcases has no reason atm
 JAVA_PKG_BSFIX_ALL=no
-inherit versionator java-pkg-2 java-ant-2
+inherit java-pkg-2 java-ant-2
+if [[ ${EAPI:-0} == 6 ]]; then
+ inherit eapi7-ver
+elif [[ ${EAPI:-0} =~ [0-5] ]]; then
+ inherit versionator
+ ver_cut() {
+ get_version_component_range "$@"
+ }
+
+ ver_test() {
+ version_is_at_least "$2"
+ }
+fi
 
 EXPORT_FUNCTIONS src_unpack src_compile src_install
 
@@ -60,12 +72,12 @@ if [[ ${PV} == *beta2* ]]; then
  MY_PV=${PV/_beta2/beta}
  UPSTREAM_PREFIX="http://people.apache.org/dist/ant/v1.7.1beta2/src"
  GENTOO_PREFIX="https://dev.gentoo.org/~caster/distfiles"
- ANT_TASK_PV=$(get_version_component_range 1-3)
+ ANT_TASK_PV=$(ver_cut 1-3)
 elif [[ ${PV} == *_rc* ]]; then
  MY_PV=${PV/_rc/RC}
  UPSTREAM_PREFIX="https://dev.gentoo.org/~caster/distfiles"
  GENTOO_PREFIX="https://dev.gentoo.org/~caster/distfiles"
- ANT_TASK_PV=$(get_version_component_range 1-3)
+ ANT_TASK_PV=$(ver_cut 1-3)
 else
  # default for final releases
  MY_PV=${PV}
@@ -101,7 +113,7 @@ if [[ -z "${ANT_TASK_DISABLE_VM_DEPS}" ]]; then
 fi
 
 # we need direct blockers with old ant-tasks for file collisions - bug #252324
-if version_is_at_least 1.7.1 ; then
+if ver_test -ge 1.7.1; then
  DEPEND+=" !dev-java/ant-tasks"
 fi
 
@@ -167,7 +179,7 @@ ant-tasks_src_install() {
  java-pkg_register-ant-task --version "${ANT_TASK_PV}"
 
  # create the compatibility symlink
- if version_is_at_least 1.7.1_beta2; then
+ if ver_test -ge 1.7.1_beta2; then
  dodir /usr/share/ant/lib
  dosym /usr/share/${PN}/lib/${PN}.jar /usr/share/ant/lib/${PN}.jar
  fi
--
2.17.0


Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] ant-tasks.eclass: use eapi7-ver

Marty E. Plummer
Actually I just noticed that eapi7-ver can now be used for EAPI 0-6, so
just unconditionally use it if EAPI != 7

Package-Manager: Portage-2.3.36, Repoman-2.3.9
---
 eclass/ant-tasks.eclass | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/eclass/ant-tasks.eclass b/eclass/ant-tasks.eclass
index e008e6eaea8..110344f712d 100644
--- a/eclass/ant-tasks.eclass
+++ b/eclass/ant-tasks.eclass
@@ -16,7 +16,8 @@
 JAVA_ANT_DISABLE_ANT_CORE_DEP=true
 # rewriting build.xml for are the testcases has no reason atm
 JAVA_PKG_BSFIX_ALL=no
-inherit versionator java-pkg-2 java-ant-2
+inherit java-pkg-2 java-ant-2
+[[ ${EAPI} == 7 ]] || inherit eapi7-ver
 
 EXPORT_FUNCTIONS src_unpack src_compile src_install
 
@@ -60,12 +61,12 @@ if [[ ${PV} == *beta2* ]]; then
  MY_PV=${PV/_beta2/beta}
  UPSTREAM_PREFIX="http://people.apache.org/dist/ant/v1.7.1beta2/src"
  GENTOO_PREFIX="https://dev.gentoo.org/~caster/distfiles"
- ANT_TASK_PV=$(get_version_component_range 1-3)
+ ANT_TASK_PV=$(ver_cut 1-3)
 elif [[ ${PV} == *_rc* ]]; then
  MY_PV=${PV/_rc/RC}
  UPSTREAM_PREFIX="https://dev.gentoo.org/~caster/distfiles"
  GENTOO_PREFIX="https://dev.gentoo.org/~caster/distfiles"
- ANT_TASK_PV=$(get_version_component_range 1-3)
+ ANT_TASK_PV=$(ver_cut 1-3)
 else
  # default for final releases
  MY_PV=${PV}
@@ -101,7 +102,7 @@ if [[ -z "${ANT_TASK_DISABLE_VM_DEPS}" ]]; then
 fi
 
 # we need direct blockers with old ant-tasks for file collisions - bug #252324
-if version_is_at_least 1.7.1 ; then
+if ver_test -ge 1.7.1; then
  DEPEND+=" !dev-java/ant-tasks"
 fi
 
@@ -167,7 +168,7 @@ ant-tasks_src_install() {
  java-pkg_register-ant-task --version "${ANT_TASK_PV}"
 
  # create the compatibility symlink
- if version_is_at_least 1.7.1_beta2; then
+ if ver_test -ge 1.7.1_beta2; then
  dodir /usr/share/ant/lib
  dosym /usr/share/${PN}/lib/${PN}.jar /usr/share/ant/lib/${PN}.jar
  fi
--
2.17.0


Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] ant-tasks.eclass: use eapi7-ver

Michał Górny-5
W dniu pon, 21.05.2018 o godzinie 17∶03 -0500, użytkownik Marty E.
Plummer napisał:

> Actually I just noticed that eapi7-ver can now be used for EAPI 0-6, so
> just unconditionally use it if EAPI != 7
>
> Package-Manager: Portage-2.3.36, Repoman-2.3.9
> ---
>  eclass/ant-tasks.eclass | 11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/eclass/ant-tasks.eclass b/eclass/ant-tasks.eclass
> index e008e6eaea8..110344f712d 100644
> --- a/eclass/ant-tasks.eclass
> +++ b/eclass/ant-tasks.eclass
> @@ -16,7 +16,8 @@
>  JAVA_ANT_DISABLE_ANT_CORE_DEP=true
>  # rewriting build.xml for are the testcases has no reason atm
>  JAVA_PKG_BSFIX_ALL=no
> -inherit versionator java-pkg-2 java-ant-2
> +inherit java-pkg-2 java-ant-2
> +[[ ${EAPI} == 7 ]] || inherit eapi7-ver

Always check for old EAPIs, instead of expecting people to keep updating
this forever.

>  
>  EXPORT_FUNCTIONS src_unpack src_compile src_install
>  
> @@ -60,12 +61,12 @@ if [[ ${PV} == *beta2* ]]; then
>   MY_PV=${PV/_beta2/beta}
>   UPSTREAM_PREFIX="http://people.apache.org/dist/ant/v1.7.1beta2/src"
>   GENTOO_PREFIX="https://dev.gentoo.org/~caster/distfiles"
> - ANT_TASK_PV=$(get_version_component_range 1-3)
> + ANT_TASK_PV=$(ver_cut 1-3)
>  elif [[ ${PV} == *_rc* ]]; then
>   MY_PV=${PV/_rc/RC}
>   UPSTREAM_PREFIX="https://dev.gentoo.org/~caster/distfiles"
>   GENTOO_PREFIX="https://dev.gentoo.org/~caster/distfiles"
> - ANT_TASK_PV=$(get_version_component_range 1-3)
> + ANT_TASK_PV=$(ver_cut 1-3)
>  else
>   # default for final releases
>   MY_PV=${PV}
> @@ -101,7 +102,7 @@ if [[ -z "${ANT_TASK_DISABLE_VM_DEPS}" ]]; then
>  fi
>  
>  # we need direct blockers with old ant-tasks for file collisions - bug #252324
> -if version_is_at_least 1.7.1 ; then
> +if ver_test -ge 1.7.1; then
>   DEPEND+=" !dev-java/ant-tasks"
>  fi
>  
> @@ -167,7 +168,7 @@ ant-tasks_src_install() {
>   java-pkg_register-ant-task --version "${ANT_TASK_PV}"
>  
>   # create the compatibility symlink
> - if version_is_at_least 1.7.1_beta2; then
> + if ver_test -ge 1.7.1_beta2; then
>   dodir /usr/share/ant/lib
>   dosym /usr/share/${PN}/lib/${PN}.jar /usr/share/ant/lib/${PN}.jar
>   fi

--
Best regards,
Michał Górny


Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] ant-tasks.eclass: use eapi7-ver

Marty E. Plummer
On Tue, May 22, 2018 at 05:57:35AM +0200, Micha?? G??rny wrote:

> W dniu pon, 21.05.2018 o godzinie 17???03???-0500, u??ytkownik Marty E.
> Plummer napisa??:
> > Actually I just noticed that eapi7-ver can now be used for EAPI 0-6, so
> > just unconditionally use it if EAPI != 7
> >
> > Package-Manager: Portage-2.3.36, Repoman-2.3.9
> > ---
> >  eclass/ant-tasks.eclass | 11 ++++++-----
> >  1 file changed, 6 insertions(+), 5 deletions(-)
> >
> > diff --git a/eclass/ant-tasks.eclass b/eclass/ant-tasks.eclass
> > index e008e6eaea8..110344f712d 100644
> > --- a/eclass/ant-tasks.eclass
> > +++ b/eclass/ant-tasks.eclass
> > @@ -16,7 +16,8 @@
> >  JAVA_ANT_DISABLE_ANT_CORE_DEP=true
> >  # rewriting build.xml for are the testcases has no reason atm
> >  JAVA_PKG_BSFIX_ALL=no
> > -inherit versionator java-pkg-2 java-ant-2
> > +inherit java-pkg-2 java-ant-2
> > +[[ ${EAPI} == 7 ]] || inherit eapi7-ver
>
> Always check for old EAPIs, instead of expecting people to keep updating
> this forever.
>
Would you prefer something like
[[ ${EAPI} ~= [0-6] ]] && inherit eapi7-ver, then?
The way I see it, every consumer of ant-tasks is eapi 5 right now, 5 and
6 if my pull request is accepted. Once every consumer is eapi 7 or greater,
this line can be removed entirely and it won't be needing updates
'forever'.

> >  
> >  EXPORT_FUNCTIONS src_unpack src_compile src_install
> >  
> > @@ -60,12 +61,12 @@ if [[ ${PV} == *beta2* ]]; then
> >   MY_PV=${PV/_beta2/beta}
> >   UPSTREAM_PREFIX="http://people.apache.org/dist/ant/v1.7.1beta2/src"
> >   GENTOO_PREFIX="https://dev.gentoo.org/~caster/distfiles"
> > - ANT_TASK_PV=$(get_version_component_range 1-3)
> > + ANT_TASK_PV=$(ver_cut 1-3)
> >  elif [[ ${PV} == *_rc* ]]; then
> >   MY_PV=${PV/_rc/RC}
> >   UPSTREAM_PREFIX="https://dev.gentoo.org/~caster/distfiles"
> >   GENTOO_PREFIX="https://dev.gentoo.org/~caster/distfiles"
> > - ANT_TASK_PV=$(get_version_component_range 1-3)
> > + ANT_TASK_PV=$(ver_cut 1-3)
> >  else
> >   # default for final releases
> >   MY_PV=${PV}
> > @@ -101,7 +102,7 @@ if [[ -z "${ANT_TASK_DISABLE_VM_DEPS}" ]]; then
> >  fi
> >  
> >  # we need direct blockers with old ant-tasks for file collisions - bug #252324
> > -if version_is_at_least 1.7.1 ; then
> > +if ver_test -ge 1.7.1; then
> >   DEPEND+=" !dev-java/ant-tasks"
> >  fi
> >  
> > @@ -167,7 +168,7 @@ ant-tasks_src_install() {
> >   java-pkg_register-ant-task --version "${ANT_TASK_PV}"
> >  
> >   # create the compatibility symlink
> > - if version_is_at_least 1.7.1_beta2; then
> > + if ver_test -ge 1.7.1_beta2; then
> >   dodir /usr/share/ant/lib
> >   dosym /usr/share/${PN}/lib/${PN}.jar /usr/share/ant/lib/${PN}.jar
> >   fi
>
> --
> Best regards,
> Micha?? G??rny
>
>

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] ant-tasks.eclass: use eapi7-ver

Ulrich Mueller-2
>>>>> On Mon, 21 May 2018, Marty E Plummer wrote:

> On Tue, May 22, 2018 at 05:57:35AM +0200, Micha?? G??rny wrote:

[Please check you mailer configuration. It's sending MIME, but
charset=us-ascii cannot represent these chars.]

>> Always check for old EAPIs, instead of expecting people to keep updating
>> this forever.
>>
> Would you prefer something like
> [[ ${EAPI} ~= [0-6] ]] && inherit eapi7-ver, then?

The regexp operator is =~ not ~=. Also it will match partial
expressions, so it will fail in EAPI 10.

Use this instead: [[ ${EAPI:-0} == [0123456] ]]

Ulrich

attachment0 (501 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] ant-tasks.eclass: use eapi7-ver

Marty E. Plummer
On Tue, May 22, 2018 at 08:27:27AM +0200, Ulrich Mueller wrote:

> >>>>> On Mon, 21 May 2018, Marty E Plummer wrote:
>
> > On Tue, May 22, 2018 at 05:57:35AM +0200, Micha?? G??rny wrote:
>
> [Please check you mailer configuration. It's sending MIME, but
> charset=us-ascii cannot represent these chars.]
>
> >> Always check for old EAPIs, instead of expecting people to keep updating
> >> this forever.
> >>
> > Would you prefer something like
> > [[ ${EAPI} ~= [0-6] ]] && inherit eapi7-ver, then?
>
> The regexp operator is =~ not ~=. Also it will match partial
> expressions, so it will fail in EAPI 10.
>
Fair, I knew it was something like that. Also, by the time EAPI 10 hits
this section of code should have been long culled since eapi7-ver's
functions are 'native' in EAPI 7.
> Use this instead: [[ ${EAPI:-0} == [0123456] ]]
>
Fair enough, that should do the trick and keep everyone happy in the
long run.
> Ulrich



Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] ant-tasks.eclass: use eapi7-ver

Marty E. Plummer
On Tue, May 22, 2018 at 01:59:51AM -0500, Marty E. Plummer wrote:

> On Tue, May 22, 2018 at 08:27:27AM +0200, Ulrich Mueller wrote:
> > >>>>> On Mon, 21 May 2018, Marty E Plummer wrote:
> >
> > > On Tue, May 22, 2018 at 05:57:35AM +0200, Micha?? G??rny wrote:
> >
> > [Please check you mailer configuration. It's sending MIME, but
> > charset=us-ascii cannot represent these chars.]
> >
> > >> Always check for old EAPIs, instead of expecting people to keep updating
> > >> this forever.
> > >>
> > > Would you prefer something like
> > > [[ ${EAPI} ~= [0-6] ]] && inherit eapi7-ver, then?
> >
> > The regexp operator is =~ not ~=. Also it will match partial
> > expressions, so it will fail in EAPI 10.
> >
> Fair, I knew it was something like that. Also, by the time EAPI 10 hits
> this section of code should have been long culled since eapi7-ver's
> functions are 'native' in EAPI 7.
> > Use this instead: [[ ${EAPI:-0} == [0123456] ]]
> >
> Fair enough, that should do the trick and keep everyone happy in the
> long run.
> > Ulrich

How's this?
---
 eclass/ant-tasks.eclass | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/eclass/ant-tasks.eclass b/eclass/ant-tasks.eclass
index e008e6eaea8..31683e68243 100644
--- a/eclass/ant-tasks.eclass
+++ b/eclass/ant-tasks.eclass
@@ -16,7 +16,8 @@
 JAVA_ANT_DISABLE_ANT_CORE_DEP=true
 # rewriting build.xml for are the testcases has no reason atm
 JAVA_PKG_BSFIX_ALL=no
-inherit versionator java-pkg-2 java-ant-2
+inherit java-pkg-2 java-ant-2
+[[ ${EAPI:-0} == [0123456] ]] && inherit eapi7-ver
 
 EXPORT_FUNCTIONS src_unpack src_compile src_install
 
@@ -60,12 +61,12 @@ if [[ ${PV} == *beta2* ]]; then
  MY_PV=${PV/_beta2/beta}
  UPSTREAM_PREFIX="http://people.apache.org/dist/ant/v1.7.1beta2/src"
  GENTOO_PREFIX="https://dev.gentoo.org/~caster/distfiles"
- ANT_TASK_PV=$(get_version_component_range 1-3)
+ ANT_TASK_PV=$(ver_cut 1-3)
 elif [[ ${PV} == *_rc* ]]; then
  MY_PV=${PV/_rc/RC}
  UPSTREAM_PREFIX="https://dev.gentoo.org/~caster/distfiles"
  GENTOO_PREFIX="https://dev.gentoo.org/~caster/distfiles"
- ANT_TASK_PV=$(get_version_component_range 1-3)
+ ANT_TASK_PV=$(ver_cut 1-3)
 else
  # default for final releases
  MY_PV=${PV}
@@ -101,7 +102,7 @@ if [[ -z "${ANT_TASK_DISABLE_VM_DEPS}" ]]; then
 fi
 
 # we need direct blockers with old ant-tasks for file collisions - bug #252324
-if version_is_at_least 1.7.1 ; then
+if ver_test -ge 1.7.1; then
  DEPEND+=" !dev-java/ant-tasks"
 fi
 
@@ -167,7 +168,7 @@ ant-tasks_src_install() {
  java-pkg_register-ant-task --version "${ANT_TASK_PV}"
 
  # create the compatibility symlink
- if version_is_at_least 1.7.1_beta2; then
+ if ver_test -ge 1.7.1_beta2; then
  dodir /usr/share/ant/lib
  dosym /usr/share/${PN}/lib/${PN}.jar /usr/share/ant/lib/${PN}.jar
  fi
--
2.17.0


Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] ant-tasks.eclass: use eapi7-ver

Duncan-42
In reply to this post by Marty E. Plummer
Marty E. Plummer posted on Mon, 21 May 2018 23:01:10 -0500 as excerpted:

>> > +[[ ${EAPI} == 7 ]] || inherit eapi7-ver
>>
>> Always check for old EAPIs, instead of expecting people to keep
>> updating this forever.
>>
> Would you prefer something like [[ ${EAPI} ~= [0-6] ]] && inherit
> eapi7-ver, then?
> The way I see it, every consumer of ant-tasks is eapi 5 right now, 5 and
> 6 if my pull request is accepted. Once every consumer is eapi 7 or
> greater,
> this line can be removed entirely and it won't be needing updates
> 'forever'.

Test defensively.  We're not just talking EAPI=8, etc, here.  What
happens if someone typos EAPI=56 or some such?  Positively support what
you recognize.  If it's unrecognized, it should always fall thru to an
error saying it's unsupported.  Much easier to debug that way. =:^)

--
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman


Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] ant-tasks.eclass: use eapi7-ver

Ulrich Mueller-2
In reply to this post by Marty E. Plummer
>>>>> On Tue, 22 May 2018, Marty E Plummer wrote:

> How's this?
> ---
>  eclass/ant-tasks.eclass | 11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)

> diff --git a/eclass/ant-tasks.eclass b/eclass/ant-tasks.eclass
> index e008e6eaea8..31683e68243 100644
> --- a/eclass/ant-tasks.eclass
> +++ b/eclass/ant-tasks.eclass
> @@ -16,7 +16,8 @@
>  JAVA_ANT_DISABLE_ANT_CORE_DEP=true
>  # rewriting build.xml for are the testcases has no reason atm
>  JAVA_PKG_BSFIX_ALL=no
> -inherit versionator java-pkg-2 java-ant-2
> +inherit java-pkg-2 java-ant-2
> +[[ ${EAPI:-0} == [0123456] ]] && inherit eapi7-ver
 
>  EXPORT_FUNCTIONS src_unpack src_compile src_install
 

> @@ -60,12 +61,12 @@ if [[ ${PV} == *beta2* ]]; then
>   MY_PV=${PV/_beta2/beta}
>   UPSTREAM_PREFIX="http://people.apache.org/dist/ant/v1.7.1beta2/src"
>   GENTOO_PREFIX="https://dev.gentoo.org/~caster/distfiles"
> - ANT_TASK_PV=$(get_version_component_range 1-3)
> + ANT_TASK_PV=$(ver_cut 1-3)
>  elif [[ ${PV} == *_rc* ]]; then
>   MY_PV=${PV/_rc/RC}
>   UPSTREAM_PREFIX="https://dev.gentoo.org/~caster/distfiles"
>   GENTOO_PREFIX="https://dev.gentoo.org/~caster/distfiles"
> - ANT_TASK_PV=$(get_version_component_range 1-3)
> + ANT_TASK_PV=$(ver_cut 1-3)
>  else
>   # default for final releases
>   MY_PV=${PV}
> @@ -101,7 +102,7 @@ if [[ -z "${ANT_TASK_DISABLE_VM_DEPS}" ]]; then
>  fi
 
>  # we need direct blockers with old ant-tasks for file collisions - bug #252324
> -if version_is_at_least 1.7.1 ; then
> +if ver_test -ge 1.7.1; then
>   DEPEND+=" !dev-java/ant-tasks"
>  fi
 
> @@ -167,7 +168,7 @@ ant-tasks_src_install() {
>   java-pkg_register-ant-task --version "${ANT_TASK_PV}"
 
>   # create the compatibility symlink
> - if version_is_at_least 1.7.1_beta2; then
> + if ver_test -ge 1.7.1_beta2; then
>   dodir /usr/share/ant/lib
>   dosym /usr/share/${PN}/lib/${PN}.jar /usr/share/ant/lib/${PN}.jar
>   fi
> --
> 2.17.0

LGTM

attachment0 (501 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] ant-tasks.eclass: use eapi7-ver

Patrice Clement
Tuesday 22 May 2018 13:28:50, Ulrich Mueller wrote :

> >>>>> On Tue, 22 May 2018, Marty E Plummer wrote:
>
> > How's this?
> > ---
> >  eclass/ant-tasks.eclass | 11 ++++++-----
> >  1 file changed, 6 insertions(+), 5 deletions(-)
>
> > diff --git a/eclass/ant-tasks.eclass b/eclass/ant-tasks.eclass
> > index e008e6eaea8..31683e68243 100644
> > --- a/eclass/ant-tasks.eclass
> > +++ b/eclass/ant-tasks.eclass
> > @@ -16,7 +16,8 @@
> >  JAVA_ANT_DISABLE_ANT_CORE_DEP=true
> >  # rewriting build.xml for are the testcases has no reason atm
> >  JAVA_PKG_BSFIX_ALL=no
> > -inherit versionator java-pkg-2 java-ant-2
> > +inherit java-pkg-2 java-ant-2
> > +[[ ${EAPI:-0} == [0123456] ]] && inherit eapi7-ver
>  
> >  EXPORT_FUNCTIONS src_unpack src_compile src_install
>  
> > @@ -60,12 +61,12 @@ if [[ ${PV} == *beta2* ]]; then
> >   MY_PV=${PV/_beta2/beta}
> >   UPSTREAM_PREFIX="http://people.apache.org/dist/ant/v1.7.1beta2/src"
> >   GENTOO_PREFIX="https://dev.gentoo.org/~caster/distfiles"
> > - ANT_TASK_PV=$(get_version_component_range 1-3)
> > + ANT_TASK_PV=$(ver_cut 1-3)
> >  elif [[ ${PV} == *_rc* ]]; then
> >   MY_PV=${PV/_rc/RC}
> >   UPSTREAM_PREFIX="https://dev.gentoo.org/~caster/distfiles"
> >   GENTOO_PREFIX="https://dev.gentoo.org/~caster/distfiles"
> > - ANT_TASK_PV=$(get_version_component_range 1-3)
> > + ANT_TASK_PV=$(ver_cut 1-3)
> >  else
> >   # default for final releases
> >   MY_PV=${PV}
> > @@ -101,7 +102,7 @@ if [[ -z "${ANT_TASK_DISABLE_VM_DEPS}" ]]; then
> >  fi
>  
> >  # we need direct blockers with old ant-tasks for file collisions - bug #252324
> > -if version_is_at_least 1.7.1 ; then
> > +if ver_test -ge 1.7.1; then
> >   DEPEND+=" !dev-java/ant-tasks"
> >  fi
>  
> > @@ -167,7 +168,7 @@ ant-tasks_src_install() {
> >   java-pkg_register-ant-task --version "${ANT_TASK_PV}"
>  
> >   # create the compatibility symlink
> > - if version_is_at_least 1.7.1_beta2; then
> > + if ver_test -ge 1.7.1_beta2; then
> >   dodir /usr/share/ant/lib
> >   dosym /usr/share/${PN}/lib/${PN}.jar /usr/share/ant/lib/${PN}.jar
> >   fi
> > --
> > 2.17.0
>
> LGTM
Thanks Marty and Ulrich. LGTM too. I'm going to merge this patch.

--
Patrice Clement
Gentoo Linux developer
http://www.gentoo.org

signature.asc (1000 bytes) Download Attachment