Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 107962 - gnome2.eclass is missing doc in IUSE
Summary: gnome2.eclass is missing doc in IUSE
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Highest normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
: 101118 116090 136604 145956 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-10-03 01:01 UTC by Jakub Moc (RETIRED)
Modified: 2006-12-06 19:17 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch against gnome2.eclass (gnome2.eclass.patch,540 bytes, patch)
2006-11-21 09:21 UTC, Petteri Räty (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jakub Moc (RETIRED) gentoo-dev 2005-10-03 01:01:07 UTC
gnome2.eclass is missing doc in IUSE but is using it:

<snip>
# doc keyword for gtk-doc
G2CONF="${G2CONF} $(use_enable doc gtk-doc)"
<snip>

Which produces "QA Notice: USE Flag 'doc' not in IUSE" for ebuilds that inherit
gnome2.eclass


Reproducible: Always
Steps to Reproduce:
Comment 1 Mike Gardiner (RETIRED) gentoo-dev 2005-10-07 19:12:04 UTC
Any reason not to add this team?
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2005-11-17 07:17:06 UTC
Please, fix this trivial bug. Thanks.
Comment 3 Leonardo Boshell (RETIRED) gentoo-dev 2005-11-17 21:20:49 UTC
*** Bug 101118 has been marked as a duplicate of this bug. ***
Comment 4 Leonardo Boshell (RETIRED) gentoo-dev 2005-11-17 21:28:25 UTC
The eclass used to have 'doc' in IUSE, but for some reason foser removed it (CVS
revision 1.55). Foser?
Comment 5 Jakub Moc (RETIRED) gentoo-dev 2005-12-19 13:37:24 UTC
*** Bug 116090 has been marked as a duplicate of this bug. ***
Comment 6 foser (RETIRED) gentoo-dev 2006-02-26 05:55:44 UTC
Not every gnome2 eclass using ebuild has optional docs to be built, having the IUSE=doc in the eclass would suggest they have. So it is really up to the seperate ebuilds to define the flag only if it is really used.

The QA notice is flawed for this use-case.
Comment 7 Jakub Moc (RETIRED) gentoo-dev 2006-02-27 01:55:35 UTC
(In reply to comment #6)
> Not every gnome2 eclass using ebuild has optional docs to be built, having the
> IUSE=doc in the eclass would suggest they have. So it is really up to the
> seperate ebuilds to define the flag only if it is really used.
> 
> The QA notice is flawed for this use-case.

<ebuild snip>
HAVE_GTK_DOC="yes"
</ebuild snip>

<eclass snip>
IUSE="debug"
if [[ ${HAVE_GTK_DOC} == "yes" ]] ; then
    IUSE="${IUSE} doc"
fi

...

# doc keyword for gtk-doc
if [[ ${HAVE_GTK_DOC} == "yes" ]] ; then
G2CONF="${G2CONF} $(use_enable doc gtk-doc)"
fi
</eclass snip>

Possible solution, but might be too many ebuilds to change, perhaps?
Comment 8 foser (RETIRED) gentoo-dev 2006-02-27 09:23:07 UTC
Quite a few. I personally think QA warnings are nothing more than indicators that something might be wrong, not that something is wrong. As such I don't really feel a need to 'fix' this, I don't think the warnings should be exposed to the general user anyway.

As a possible solution, rather than adding another env. var. we could make the IUSE optional based on a quick scan of configure.in . I'm not sure if thats frowned upon as bad behaviour for eclasses ?
Comment 9 Jakub Moc (RETIRED) gentoo-dev 2006-02-28 08:04:31 UTC
(In reply to comment #8)
> Quite a few. I personally think QA warnings are nothing more than indicators
> that something might be wrong, not that something is wrong. As such I don't
> really feel a need to 'fix' this, I don't think the warnings should be exposed
> to the general user anyway.

Shrug, you'll need to discuss the warning stuff w/ portage guys mostly likely. :)
 
> As a possible solution, rather than adding another env. var. we could make the
> IUSE optional based on a quick scan of configure.in . I'm not sure if thats
> frowned upon as bad behaviour for eclasses ?

This sounds kinda like a hack, better to ignore the QA notice altogether then. My understanding is that use flags need to be shown to users at emerge -p time, no way to achieve this with the above suggestion (whether it's allowed or not). Considering that there are ebuilds in the tree, that inherit bogus use flags from KDE eclasses and show them to users even that they are not honored later on, the thing this bug is about is really a cosmetic issue.
Comment 10 foser (RETIRED) gentoo-dev 2006-02-28 08:12:06 UTC
(In reply to comment #9)
> > As a possible solution, rather than adding another env. var. we could make the
> > IUSE optional based on a quick scan of configure.in . I'm not sure if thats
> > frowned upon as bad behaviour for eclasses ?
> 
> This sounds kinda like a hack, better to ignore the QA notice altogether then.
> My understanding is that use flags need to be shown to users at emerge -p time,
> no way to achieve this with the above suggestion (whether it's allowed or not).

Right, i wasn't thinking straight :)

I'll poke some portage maintainer about it.
Comment 11 Jakub Moc (RETIRED) gentoo-dev 2006-06-13 00:09:31 UTC
*** Bug 136604 has been marked as a duplicate of this bug. ***
Comment 12 Jakub Moc (RETIRED) gentoo-dev 2006-09-02 01:14:03 UTC
*** Bug 145956 has been marked as a duplicate of this bug. ***
Comment 13 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2006-09-02 03:59:24 UTC
(In reply to comment #7)
> # doc keyword for gtk-doc
> if [[ ${HAVE_GTK_DOC} == "yes" ]] ; then
> G2CONF="${G2CONF} $(use_enable doc gtk-doc)"
> fi
> </eclass snip>
> 
> Possible solution, but might be too many ebuilds to change, perhaps?

What about this:

1. don't change IUSE in the eclass
2. snip above would look like this:

# doc keyword for gtk-doc
if [[ (have doc in IUSE) ]] ; then
  G2CONF="${G2CONF} $(use_enable doc gtk-doc)"
fi

I don't know how to do the doc-IUSE check exactly, but it should be possible using hasq or something similar.
Comment 14 Jakub Moc (RETIRED) gentoo-dev 2006-09-02 04:10:14 UTC
(In reply to comment #13)
> 1. don't change IUSE in the eclass
> 2. snip above would look like this:
> 
> # doc keyword for gtk-doc
> if [[ (have doc in IUSE) ]] ; then
>   G2CONF="${G2CONF} $(use_enable doc gtk-doc)"
> fi

Read Comment #6 please... Also, the above is just redundant code, doesn't change anything from current behaviour, and doesn't fix the QA notice either.
Comment 15 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2006-09-02 04:31:32 UTC
(In reply to comment #14)
> Read Comment #6 please... Also, the above is just redundant code, doesn't
> change anything from current behaviour, and doesn't fix the QA notice either.

Why do you think so? Comment #6 states (as I understand it) that it's not good solution to add doc to IUSE in the eclass and that it's up to ebuilds to do it.

So, possible fixes are:
- move the $(use_enable doc gtk-doc) to ebuilds
- don't check for doc USE unless it's in IUSE (my solution from Comment #13)
- ignore the issue (why not resolve bug as WONTFIX then?)
Comment 16 Jakub Moc (RETIRED) gentoo-dev 2006-09-02 04:36:28 UTC
(In reply to comment #15)
> Why do you think so? Comment #6 states (as I understand it) that it's not good
> solution to add doc to IUSE in the eclass and that it's up to ebuilds to do it.

Because it will _still_ leave all other ebuilds that inherit gnome2.eclass spit out the QA notice.

> So, possible fixes are:
> - move the $(use_enable doc gtk-doc) to ebuilds
> - don't check for doc USE unless it's in IUSE (my solution from Comment #13)
> - ignore the issue (why not resolve bug as WONTFIX then?)

Won't solve anything, that's not how IUSE and this check works (see above).

 

Comment 17 Doug Goldstein (RETIRED) gentoo-dev 2006-09-02 07:43:54 UTC
If the eclass uses the "doc" USE flag then it needs IUSE="doc". END OF STORY

It is NOT up to ebuilds to add "doc" to their USE flags. That is WRONG and broken.

I will CC the QA team on this.
Comment 18 Petteri Räty (RETIRED) gentoo-dev 2006-11-21 09:21:57 UTC
Created attachment 102475 [details, diff]
patch against gnome2.eclass

This is the solution that other eclasses use:
<snip from betelgeuse@pena /usr/portage/eclass $ grep IUSE * | grep has>
java-utils-2.eclass:    if hasq jikes ${IUSE}; then
java-vm-2.eclass:       if has nsplugin ${IUSE} && use nsplugin; then
kde.eclass:                             if hasq kdeenablefinal ${IUSE}; then
kde.eclass:                             if hasq kdehiddenvisibility ${IUSE} && use kdehiddenvisibility; then
pam.eclass:     if hasq pam ${IUSE} && ! use pam; then
pam.eclass:     if hasq pam ${IUSE} && ! use pam; then
Comment 19 Saleem Abdulrasool (RETIRED) gentoo-dev 2006-12-06 19:17:10 UTC
Though foser is right, the patch has been applied, lets hope thats the end of this never-ending bug.