Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 49179 - ALLOWED_FLAGS in extra_functions.sh overrides flag-o-matic.eclass
Summary: ALLOWED_FLAGS in extra_functions.sh overrides flag-o-matic.eclass
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Aron Griffis (RETIRED)
URL:
Whiteboard:
Keywords: InVCS
: 51352 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-04-27 10:00 UTC by Aron Griffis (RETIRED)
Modified: 2004-10-22 08:47 UTC (History)
10 users (show)

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


Attachments
missing-flag-o-matic.txt (missing-flag-o-matic.txt,1.49 KB, text/plain)
2004-04-27 10:22 UTC, Aron Griffis (RETIRED)
Details
Patch against extra_functions.sh to remove flag-o-matic cruft (extra_functions.sh.patch,2.40 KB, patch)
2004-04-27 11:28 UTC, Aron Griffis (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Aron Griffis (RETIRED) gentoo-dev 2004-04-27 10:00:16 UTC
While working on the mozilla ebuild, I found that -fstack-protector is always filtered by strip-flags.  This is because ALLOWED_FLAGS is set in extra-functions.sh.  flag-o-matic.eclass has the following

    if [ -z "${ALLOWED_FLAGS}" ] ; then
        export ALLOWED_FLAGS="-O -O1 -O2 -mcpu -march -mtune -fstack-protector -pipe -g"
        ...
    fi

So flag-o-matic never overrides the ALLOWED_FLAGS from ebuild.sh because it is trying to allow the ebuild to set a custom ALLOWED_FLAGS

Clearly the flag-o-matic functions should never have been sucked into portage at all.  extra-functions.sh simply doesn't make sense since those functions can be better maintained in eclasses, and there's no reason to make them dependent on the portage release cycle.

I would like to do the following:

1. Fix all the ebuilds using flag functions to inherit flag-o-matic properly
2. Kill the flag-o-matic section from extra-functions.sh
Comment 1 Aron Griffis (RETIRED) gentoo-dev 2004-04-27 10:02:18 UTC
Btw, I am starting on #1 now, similar to the way I did econf || die yesterday
Comment 2 Aron Griffis (RETIRED) gentoo-dev 2004-04-27 10:22:36 UTC
Created attachment 30164 [details]
missing-flag-o-matic.txt

sed -n '/^[a-z]/s/(.*//p' eclass/flag-o-matic.eclass > flag-o-list.txt
find . -name \*.ebuild | xargs grep -L '^inherit.*flag-o-matic' | xargs grep
-wFf flag-o-list.txt | sort | tee missing-flag-o-matic.txt
Comment 3 solar (RETIRED) gentoo-dev 2004-04-27 11:16:13 UTC
Adding a few extra commands to your output I get the following list of 
package maintainers. Which I'll add to the CC so they may be aware of
this problem and hopefully use flag-o in the future with inherit
statements.

cat missing-flag-o-matic.txt | cut -d : -f 1 | while read ebuild ; do 
	[ -f /portage/`dirname ${ebuild}`/metadata.xml ] && \
		echo $(grep email /portage/`dirname ${ebuild}`/metadata.xml ) \
		maintains $ebuild |sed s/'<email>'//g| sed s:'</email>'::g; 
done

taviso@gentoo.org maintains ./app-shells/ksh/ksh-93.20030724.ebuild
taviso@gentoo.org maintains ./app-shells/ksh/ksh-93.20040229.ebuild
media-video@gentoo.org maintains ./dev-libs/libebml/libebml-0.6.4.ebuild
media-video@gentoo.org maintains ./dev-libs/libebml/libebml-0.6.5.ebuild
media-video@gentoo.org maintains ./media-libs/libmatroska/libmatroska-0.6.3.ebuild
media-video@gentoo.org maintains ./media-plugins/live/live-2004.03.27.ebuild
blkdeath@gentoo.org maintains ./net-dns/bind-tools/bind-tools-9.2.3.ebuild
aliz@gentoo.org maintains ./net-firewall/fwbuilder/fwbuilder-1.0.11.ebuild
aliz@gentoo.org maintains ./net-firewall/fwbuilder/fwbuilder-1.1.1.ebuild
aliz@gentoo.org maintains ./net-firewall/fwbuilder/fwbuilder-1.1.1-r1.ebuild
stkn@gentoo.org maintains ./net-libs/openh323/openh323-1.13.5.ebuild
maintains ./sys-devel/gcc/gcc-3.0.4-r6.ebuild
spock@gentoo.org maintains ./x11-misc/xfractint/xfractint-20.2.04.ebuild
spock@gentoo.org maintains ./x11-misc/xfractint/xfractint-20.2.05.ebuild
spock@gentoo.org maintains ./x11-misc/xfractint/xfractint-20.3.00.ebuild
spock@gentoo.org maintains ./x11-misc/xfractint/xfractint-20.3.01.ebuild
taviso@gentoo.org maintains ./x11-terms/xvt/xvt-2.1.ebuild
Comment 4 Aron Griffis (RETIRED) gentoo-dev 2004-04-27 11:28:18 UTC
Created attachment 30168 [details, diff]
Patch against extra_functions.sh to remove flag-o-matic cruft
Comment 5 Aron Griffis (RETIRED) gentoo-dev 2004-04-27 11:35:06 UTC
I guess my last comment was lost... I finished fixing the list of ebuilds, that's why the patch can now be applied to extra_functions.sh
Comment 6 Aron Griffis (RETIRED) gentoo-dev 2004-04-27 11:40:54 UTC
I'm putting further updates in 29683
Comment 7 Stewart (RETIRED) gentoo-dev 2004-04-28 23:54:09 UTC
Sorry, I must be missing something here; one of my ebuilds inherits flag-o-matic, but I can't tell what I'm doing/not doing.
Comment 8 Aron Griffis (RETIRED) gentoo-dev 2004-04-29 07:10:56 UTC
Stewart, need more info... what ebuild, and what don't you understand?
Comment 9 Stewart (RETIRED) gentoo-dev 2004-04-30 10:18:32 UTC
blkdeath@gentoo.org maintains ./net-dns/bind-tools/bind-tools-9.2.3.ebuild

I'm the BIND maintainer, the above ebuild does inherit flag-o-matic, but I don't understand why I'm being CC'ed on this bug - ie I don't understand what's being done incorrectly in said ebuild.
Comment 10 Aron Griffis (RETIRED) gentoo-dev 2004-04-30 11:00:06 UTC
Stewart, the reason you and everybody else is being cc'd on this bug is to make you aware that your ebuild was modified to use the flag functions from flag-o-matic.  I modified your ebuild because it was using the flag functions from extra_functions.sh, and those functions are being removed in favor of the flag-o-matic eclass.  So we want you to be aware of this so that future versions of your ebuild will continue to inherit flag-o-matic.  Okay?  :-)
Comment 11 Nicholas Jones (RETIRED) gentoo-dev 2004-05-16 04:29:25 UTC
This is out of portage for the next revisions.
Comment 12 SpanKY gentoo-dev 2004-05-29 14:14:20 UTC
*** Bug 51352 has been marked as a duplicate of this bug. ***
Comment 13 Nicholas Jones (RETIRED) gentoo-dev 2004-10-22 08:47:30 UTC
Bug has been fixed and released in stable portages on or before 2.0.51-r2