FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo Development

 
 
LinkBack Thread Tools
 
Old 03-12-2010, 06:39 PM
Petteri Räty
 
Default eqawarn for main tree

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 -0000 1.340
+++ eutils.eclass 12 Mar 2010 19:36:28 -0000
@@ -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:
 
Old 03-12-2010, 08:27 PM
Zac Medico
 
Default eqawarn for main tree

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
 
Old 03-13-2010, 06:16 PM
Petteri Räty
 
Default eqawarn for main tree

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
 
Old 07-05-2010, 06:14 PM
Petteri Räty
 
Default eqawarn for main tree

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
 
Old 07-05-2010, 06:19 PM
Mark Loeser
 
Default eqawarn for main tree

Petteri Räty <betelgeuse@gentoo.org> 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
 
Old 07-10-2010, 11:15 AM
Petteri Räty
 
Default eqawarn for main tree

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.
</section>

<section>
+<title>QA warnings</title>
+<body>
+
+<p>
+ The <c>eqawarn</c> 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.
+</p>
+
+</body>
+</section>
+
+<section>
<title>Message function reference</title>
<body>

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.
</table>

<p>
- The following are available from <c>eutils.eclass</c> 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 <c>eutils.eclass</c> . ebeep and epause
+ are deprecated in EAPIS 0, 1 and 2 in favor of GLEP 42 news items and
+ package manager message logging functionality.
</p>

<table>
@@ -108,6 +108,14 @@ displaying informational messages.
Beep the specified number (must be a positive integer) of times. Defaults to a sane value.
</ti>
</tr>
+ <tr>
+ <ti>
+ <c>eqawarn</c>
+ </ti>
+ <ti>
+ Used by eclass authors to notify ebuild writers that they are using deprecated functionality.
+ </ti>
+ </tr>
</table>

<p>
 
Old 07-10-2010, 05:40 PM
"Paweł Hajdan, Jr."
 
Default eqawarn for main tree

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ł
 
Old 07-10-2010, 05:48 PM
Petteri Räty
 
Default eqawarn for main tree

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
 

Thread Tools




All times are GMT. The time now is 09:09 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org