Bug 79062 - gcc-config ebuild should double-check for old /usr/sbin versions
Bug#: 79062 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: Linux Status: RESOLVED Severity: minor Priority: P2
Resolution: FIXED Assigned To: toolchain@gentoo.org Reported By: 1i5t5.duncan@cox.net
Component: Core system
URL: 
Summary: gcc-config ebuild should double-check for old /usr/sbin versions
Keywords:  
Status Whiteboard: 
Opened: 2005-01-22 03:10 0000
Description:   Opened: 2005-01-22 03:10 0000
Somehow, I got two versions of gcc-config on my system, the newer
/usr/bin/gcc-config, and an older /usr/sbin/gcc-config.  I guess an unmerge
somewhere along the line screwed up.

For some time I had been seeing a strange error when I emerged a new version,
something about '[1]' not being found in /etc/env.d/gcc/.  As it happens, that
warning was due to the pkg-postinst calling gcc-config twice in a compound
command, the output of one being the input of the other, but once had the
absolute path specified, while the other relied on $PATH.  Since I have my
sbins before my bins in my pathorder, this caused one version to feed the other
and produced an error.  However, I'd noticed no ill effects until I tried to
upgrade to 2005.0 (amd64) and couldn't compile glibc due to having run the old
gcc-config (because I'd run it without an absolute path).

Anyway... if I somehow had two different versions, one in /usr/bin, one in
/usr/sbin, it's likely that others do as well.  Since the location has
obviously changed at some point, it might be wise for the ebuild to do a
postinst sanity check, before the current postinst stuff, and delete any old
/usr/sbin/gcc-config it finds, just to be safe and in case the unmerge of the
old version didn't catch it for whatever reason.  It could prevent others
filing needless bugs due to gcc-config problems long since fixed in the new
versions, because they have the new version installed, but are invoking the old
one, in the future.  If it happened to me, there are probably others out there
with the problem as well.

Reproducible: Always
Steps to Reproduce:




Current gcc-config (1.3.9) puts the exe in /usr/bin.  I haven't the foggiest 
how old the version I had in /usr/sbin/ was, save that it's a version merged 
since 2004.1, since that's what I started on Gentoo with.

------- Comment #1 From SpanKY 2005-01-23 18:35:58 0000 -------
done deal