On Fri, Dec 9, 2016 at 1:09 AM, Michał Górny <mgo...@gentoo.org> wrote:
> On Thu,  8 Dec 2016 21:36:28 +0100
> Andreas K. Hüttel <dilfri...@gentoo.org> wrote:
>
>> From: Doug Freed <dwfr...@mtu.edu>
>>
>> ---
>>  eclass/depend.apache.eclass | 6 +++---
>>  1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/eclass/depend.apache.eclass b/eclass/depend.apache.eclass
>> index b69c2ec..a7d206f 100644
>> --- a/eclass/depend.apache.eclass
>> +++ b/eclass/depend.apache.eclass
>> @@ -290,7 +290,7 @@ has_apache() {
>>  has_apache_threads() {
>>       debug-print-function $FUNCNAME $*
>>
>> -     if ! built_with_use www-servers/apache threads; then
>> +     if ! has_version 'www-servers/apache[threads]'; then
>>               return
>>       fi
>>
>> @@ -313,14 +313,14 @@ has_apache_threads() {
>>  has_apache_threads_in() {
>>       debug-print-function $FUNCNAME $*
>>
>> -     if ! built_with_use www-servers/apache threads; then
>> +     if ! has_version 'www-servers/apache[threads]'; then
>>               return
>>       fi
>>
>>       local myforeign="$1"
>>       local myflag="${2:-threads}"
>>
>> -     if ! built_with_use ${myforeign} ${myflag}; then
>> +     if ! has_version "${myforeign}[${myflag}]"; then
>>               echo
>>               eerror "You need to enable USE flag '${myflag}' in 
>> ${myforeign} to"
>>               eerror "build a thread-safe version of ${CATEGORY}/${PN} for 
>> use"
>
> I don't think it's valid for EAPI 0/1. You should probably move the
> EAPI 1 ban first, to avoid keeping half-broken state between commits,
> and add an explicit die call here for EAPI 0. It's better if ebuild
> dies with explanation rather than unreliably fails with invalid
> has_version syntax.

Correct, USE dependencies don't exist until EAPI 2 (which is why
people used built_with_use instead of has_version).  This is why I
banned both EAPI 0 and 1 in my version of the patch.  There are
presently 19 EAPI 0 consumers of this eclass, though.

-Doug

Reply via email to