Bug 55262 - gcc-config cleanup patch
Bug#: 55262 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: All Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: toolchain@gentoo.org Reported By: ferret@explodingferret.com
Component: Core system
URL: 
Summary: gcc-config cleanup patch
Keywords:  
Status Whiteboard: 
Opened: 2004-06-26 10:21 0000
Description:   Opened: 2004-06-26 10:21 0000
gcc-config needs some cleanup.  It does weird things like "which which" which
just aren't necessary. :)

Since its interpreter in /bin/bash, it can ue the bash builtin "type -path" for
the exact same effect, removeing a dependency on which.

In stage tarballs, which doesn't exist. I don't know if gcc-config does, and
gcc-config contains some backup code in case which fails for any reason, but I
still think this cleanup is necessay to kill any bugs-in-waiting and just because
it makes for nicer code.

------- Comment #1 From ferret 2004-06-26 10:22:32 0000 -------
Created an attachment (id=34208) [details]
patch to remove gcc-config's dependency on which

------- Comment #2 From Martin Schlemmer (RETIRED) 2004-06-27 02:11:27 0000 -------
Problem I have, is that it breaks if you have an alias set for what you
querry:

--
azarah@nosferatu azarah $ type -path cp
azarah@nosferatu azarah $ type -path rm
azarah@nosferatu azarah $ type -path mv
azarah@nosferatu azarah $ type -path ln
/bin/ln
--

Sure, you can now first unset the alias first, but now you have to check if
the alias exists, and then unset it, etc, so it gets as hairy, if not more ...

------- Comment #3 From ferret 2004-06-28 10:32:45 0000 -------
Created an attachment (id=34337) [details]
fixed patch

Thanks for the advice.

------- Comment #4 From Martin Schlemmer (RETIRED) 2004-07-01 10:08:12 0000 -------
Ditto, more like it.

------- Comment #5 From Martin Schlemmer (RETIRED) 2004-07-24 13:39:27 0000 -------
Done, thanks.