Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 365223 - sys-devel/gcc-config-1.5-r1: bug in postinst() ?
Summary: sys-devel/gcc-config-1.5-r1: bug in postinst() ?
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-28 16:20 UTC by Jeremy Olexa (darkside) (RETIRED)
Modified: 2011-04-28 20:01 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2011-04-28 16:20:03 UTC
In 1.4.1, the postinst code does:
if gcc-config --get-current-profile returns 0; then "do stuff" & run gcc-config $(gcc-config --get-current-profile); fi

Result: gcc-config <CHOST>-<VER>

In 1.5, the postinst code does:
for x in $(gcc-config -C -l 2>/dev/null | awk '$NF == "*" { print $2 }'); do gcc-config $x; done

Result: noop

The bug is that $(gcc-config -C -l 2>/dev/null | awk '$NF == "*" { print $2 }') returns null. I am unsure of the intent, but I think someone was trying to do this:

% gcc-config -C -l| grep \* | awk '{ print $2 }'
x86_64-pc-linux-gnu-4.5.2

vs.

% gcc-config -C -l| awk '$NF == "*" { print $2 }'
%

Am I wrong or misinformed? Thanks.
Comment 1 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2011-04-28 17:20:39 UTC
Not exactly related, but I did spend too much time on figuring out why it worked for some and not for some others. The end result was a changed file without a revbump for 1.4.1...

Recommendation: Revbump the ebuild and mark it straight to stable so everyone has the same file.
Comment 2 SpanKY gentoo-dev 2011-04-28 20:01:41 UTC
older versions shouldnt matter.  the code is in postinst which means it can only be executed once you've installed a newer version.  thus no revbump/stable is necessary, and actually emerging the version in question works for everyone.