Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 87528 - gcc-config fails when /etc is managed with SVN
Summary: gcc-config fails when /etc is managed with SVN
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High minor
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-01 01:47 UTC by Remy Blank
Modified: 2005-04-09 11:37 UTC (History)
0 users

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


Attachments
Patch correcting the problem (gcc-config.patch,576 bytes, patch)
2005-04-01 01:51 UTC, Remy Blank
Details | Diff
Patch that really corrects the problem (gcc-config.patch,580 bytes, patch)
2005-04-09 00:16 UTC, Remy Blank
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Remy Blank 2005-04-01 01:47:54 UTC
I manage my configurations in /etc with SVN. This means that every directory gets a hidden sub-directory called ".svn" containing various files and directories.

gcc-config sources all files in /etc/env.d/gcc *including sub-directories* with a name matching the pattern "${REAL_CHOST}-*". Unfortunately, SVN has files matching this pattern in .svn.

One way to correct the problem is to limit the search to /etc/env.d/gcc *without sub-directories*. I'll attach a patch that implements this.

Using gcc-config-1.3.10-r1.

Reproducible: Always
Steps to Reproduce:
1. Manage /etc/env.d/gcc with SVN
2. Switch profile with gcc-config

Actual Results:  
gcc-config outputs the following:

 * Switching to i686-pc-linux-gnu-3.3.5 compiler...
/usr/sbin/gcc-config: line 1: K: command not found
/usr/sbin/gcc-config: line 2: fs:unix:access: command not found
/usr/sbin/gcc-config: line 3: V: command not found
/usr/sbin/gcc-config: line 4: 644: command not found

(...)

/usr/sbin/gcc-config: line 17: K: command not found
/usr/sbin/gcc-config: line 18: fs:unix:user: command not found
/usr/sbin/gcc-config: line 19: V: command not found
/usr/sbin/gcc-config: line 20: root: command not found
/usr/sbin/gcc-config: line 21: END: command not found                     [ ok ]

So gcc-config actually succeeds, but the behaviour is not quite correct.

Expected Results:  
 * Switching to i686-pc-linux-gnu-3.3.5 compiler...                       [ ok ]
Comment 1 Remy Blank 2005-04-01 01:51:54 UTC
Created attachment 55019 [details, diff]
Patch correcting the problem

This is a patch against gcc-config-1.3.10-r1 that limits the search to
/etc/env.d/gcc without looking in sub-directories.
Comment 2 SpanKY gentoo-dev 2005-04-01 15:56:40 UTC
fixed in cvs, thanks
Comment 3 Remy Blank 2005-04-09 00:16:36 UTC
Created attachment 55739 [details, diff]
Patch that really corrects the problem

The previous patch didn't work correctly. Also, the fix in CVS doesn't, either.
This patch restricts the search to 1 level, i.e. the /etc/env.d/gcc directory.
That should definitely do it.
Comment 4 Remy Blank 2005-04-09 00:17:13 UTC
Also, sorry for the bad first patch.
Comment 5 SpanKY gentoo-dev 2005-04-09 11:37:55 UTC
done