Re: [gentoo-dev] eqawarn for main tree

2010-07-10 Thread Petteri Räty
On 07/10/2010 08:40 PM, "Paweł Hajdan, Jr." wrote:
> On 7/10/10 4:15 AM, Petteri Räty wrote:
>> Attached is the patch I plan on pushing with the eclass commit.
> 
> Just making sure... will the developer profile print the eqawarn
> messages by default on exit?
> 

Doesn't look like it. I use this in my make.conf:
PORTAGE_ELOG_SYSTEM="${PORTAGE_ELOG_SYSTEM} echo:qa save:qa"

Probably someone who maintains developer profiles (if such a person
exists) can add something like that there after testing.

Regards,
Petteri



signature.asc
Description: OpenPGP digital signature


Re: [gentoo-dev] eqawarn for main tree

2010-07-10 Thread Paweł Hajdan, Jr.
On 7/10/10 4:15 AM, Petteri Räty wrote:
> Attached is the patch I plan on pushing with the eclass commit.

Just making sure... will the developer profile print the eqawarn
messages by default on exit?

Paweł



signature.asc
Description: OpenPGP digital signature


Re: [gentoo-dev] eqawarn for main tree

2010-07-10 Thread Petteri Räty
On 07/05/2010 09:19 PM, Mark Loeser wrote:
>>
>> As there was no further response and next EAPI isn't around the corner I
>> propose getting the ball rolling with option 1. I will commit the patch
>> next Sunday with needed documentation unless something comes up.
> 
> Could you please give a description as to when you believe this function
> should be used.  Preferably as a patch for devmanual :)
> 
> Thanks,
> 

Attached is the patch I plan on pushing with the eclass commit.

Regards,
Petteri
diff --git a/ebuild-writing/messages/text.xml b/ebuild-writing/messages/text.xml
index 4720be4..2bb348a 100644
--- a/ebuild-writing/messages/text.xml
+++ b/ebuild-writing/messages/text.xml
@@ -95,6 +95,19 @@ is mainly used for displaying additional error details 
before bailing out.
 
 
 
+QA warnings
+
+
+
+   The eqawarn function can be used by eclass authors to notify 
ebuild writers about
+   deprecated functionality. eqawarn is defined in eutils. Portage doesn't 
log the qa message
+   class by default so users don't get annoyed by seeing messages they 
can't do much about.
+
+
+
+
+
+
 Message function reference
 
 
diff --git a/function-reference/message-functions/text.xml 
b/function-reference/message-functions/text.xml
index 97c86e6..24f4b82 100644
--- a/function-reference/message-functions/text.xml
+++ b/function-reference/message-functions/text.xml
@@ -77,9 +77,9 @@ displaying informational messages.
 
 
 
-   The following are available from eutils.eclass in EAPIs 0, 1 and 
2.
-   They are deprecated in favor of GLEP 42 news items and package manager
-   message logging functionality.
+   The following are available from eutils.eclass . ebeep and epause
+   are deprecated in EAPIS 0, 1 and 2 in favor of GLEP 42 news items and
+   package manager message logging functionality.
 
 
 
@@ -108,6 +108,14 @@ displaying informational messages.
   Beep the specified number (must be a positive integer) of times. 
Defaults to a sane value.
 
   
+  
+
+  eqawarn
+
+
+  Used by eclass authors to notify ebuild writers that they are using 
deprecated functionality.
+
+  
 
 
 


signature.asc
Description: OpenPGP digital signature


Re: [gentoo-dev] eqawarn for main tree

2010-07-05 Thread Mark Loeser
Petteri Räty  said:
> On 03/12/2010 11:27 PM, Zac Medico wrote:
> > On 03/12/2010 11:39 AM, Petteri Räty wrote:
> >> In eclasses there's often use for outputting QA warnings for ebuild
> >> authors (at least in java and python could immediately make use of
> >> this). Currently Portage has eqawarn available but it's considered
> >> internal. Hopefully eqawarn finds it's way to the next EAPI but in the
> >> mean while do we want:
> >>
> >> 1) Do a wrapper like attached to eutils.eclass
> >> 2) Use whatever e* function that seems most appropriate (for example
> >> einfo when it's common so user LOGging setups don't get too much noise)
> >> 3) Have a speedy next EAPI if we can find more stuff like this to bundle
> > 
> > Here's another option:
> > 
> > 4) Retroactively add eqawarn to all EAPIs and use introspection to
> > call eqawarn only if available (and drop the introspection after
> > about 1 year):
> > 
> >declare -F eqawarn >/dev/null && \
> >eqawarn "this is ignored by older package managers"
> > 
> 
> As there was no further response and next EAPI isn't around the corner I
> propose getting the ball rolling with option 1. I will commit the patch
> next Sunday with needed documentation unless something comes up.

Could you please give a description as to when you believe this function
should be used.  Preferably as a patch for devmanual :)

Thanks,

-- 
Mark Loeser
email -   halcy0n AT gentoo DOT org
email -   mark AT halcy0n DOT com
web   -   http://www.halcy0n.com


signature.asc
Description: Digital signature


Re: [gentoo-dev] eqawarn for main tree

2010-07-05 Thread Petteri Räty
On 03/12/2010 11:27 PM, Zac Medico wrote:
> On 03/12/2010 11:39 AM, Petteri Räty wrote:
>> In eclasses there's often use for outputting QA warnings for ebuild
>> authors (at least in java and python could immediately make use of
>> this). Currently Portage has eqawarn available but it's considered
>> internal. Hopefully eqawarn finds it's way to the next EAPI but in the
>> mean while do we want:
>>
>> 1) Do a wrapper like attached to eutils.eclass
>> 2) Use whatever e* function that seems most appropriate (for example
>> einfo when it's common so user LOGging setups don't get too much noise)
>> 3) Have a speedy next EAPI if we can find more stuff like this to bundle
> 
> Here's another option:
> 
> 4) Retroactively add eqawarn to all EAPIs and use introspection to
> call eqawarn only if available (and drop the introspection after
> about 1 year):
> 
>declare -F eqawarn >/dev/null && \
>eqawarn "this is ignored by older package managers"
> 

As there was no further response and next EAPI isn't around the corner I
propose getting the ball rolling with option 1. I will commit the patch
next Sunday with needed documentation unless something comes up.

Regards,
Petteri



signature.asc
Description: OpenPGP digital signature


Re: [gentoo-dev] eqawarn for main tree

2010-03-13 Thread Petteri Räty
On 03/12/2010 11:27 PM, Zac Medico wrote:
> On 03/12/2010 11:39 AM, Petteri Räty wrote:
>> In eclasses there's often use for outputting QA warnings for ebuild
>> authors (at least in java and python could immediately make use of
>> this). Currently Portage has eqawarn available but it's considered
>> internal. Hopefully eqawarn finds it's way to the next EAPI but in the
>> mean while do we want:
>>
>> 1) Do a wrapper like attached to eutils.eclass
>> 2) Use whatever e* function that seems most appropriate (for example
>> einfo when it's common so user LOGging setups don't get too much noise)
>> 3) Have a speedy next EAPI if we can find more stuff like this to bundle
> 
> Here's another option:
> 
> 4) Retroactively add eqawarn to all EAPIs and use introspection to
> call eqawarn only if available (and drop the introspection after
> about 1 year):
> 
>declare -F eqawarn >/dev/null && \
>eqawarn "this is ignored by older package managers"
> 

I would rather focus on fixing the problem of new EAPI implementations
taking so long rather than retroactive hacks.

Regards,
Petteri



signature.asc
Description: OpenPGP digital signature


Re: [gentoo-dev] eqawarn for main tree

2010-03-12 Thread Zac Medico
On 03/12/2010 11:39 AM, Petteri Räty wrote:
> In eclasses there's often use for outputting QA warnings for ebuild
> authors (at least in java and python could immediately make use of
> this). Currently Portage has eqawarn available but it's considered
> internal. Hopefully eqawarn finds it's way to the next EAPI but in the
> mean while do we want:
> 
> 1) Do a wrapper like attached to eutils.eclass
> 2) Use whatever e* function that seems most appropriate (for example
> einfo when it's common so user LOGging setups don't get too much noise)
> 3) Have a speedy next EAPI if we can find more stuff like this to bundle

Here's another option:

4) Retroactively add eqawarn to all EAPIs and use introspection to
call eqawarn only if available (and drop the introspection after
about 1 year):

   declare -F eqawarn >/dev/null && \
   eqawarn "this is ignored by older package managers"

-- 
Thanks,
Zac



[gentoo-dev] eqawarn for main tree

2010-03-12 Thread Petteri Räty
In eclasses there's often use for outputting QA warnings for ebuild
authors (at least in java and python could immediately make use of
this). Currently Portage has eqawarn available but it's considered
internal. Hopefully eqawarn finds it's way to the next EAPI but in the
mean while do we want:

1) Do a wrapper like attached to eutils.eclass
2) Use whatever e* function that seems most appropriate (for example
einfo when it's common so user LOGging setups don't get too much noise)
3) Have a speedy next EAPI if we can find more stuff like this to bundle

Regards,
Petteri
Index: eutils.eclass
===
RCS file: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v
retrieving revision 1.340
diff -u -r1.340 eutils.eclass
--- eutils.eclass   7 Mar 2010 03:00:08 -   1.340
+++ eutils.eclass   12 Mar 2010 19:36:28 -
@@ -63,6 +63,17 @@
 
 fi
 
+# @FUNCTION: eqawarn
+# @USAGE: [message]
+# @DESCRIPTION:
+# Proxy to einfo for package managers that don't provide eqawarn and use the PM
+# implementation if available.
+if ! declare -F eqawarn >/dev/null ; then
+   eqawarn() {
+   einfo "$@"
+   }
+fi
+
 # @FUNCTION: ecvs_clean
 # @USAGE: [list of dirs]
 # @DESCRIPTION:


signature.asc
Description: OpenPGP digital signature