Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 15006 - sed expression needs rebuilt, contains too many slashes
Summary: sed expression needs rebuilt, contains too many slashes
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Seemant Kulleen (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 6071 8110 13223 14119
  Show dependency tree
 
Reported: 2003-02-02 16:31 UTC by Blu3
Modified: 2003-02-10 06:18 UTC (History)
0 users

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


Attachments
List of ebuilds with broken sed expressions (diff.list,2.95 KB, text/plain)
2003-02-02 17:54 UTC, Blu3
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Blu3 2003-02-02 16:31:06 UTC
Numerous packages are failing due to broken sed expressions.  Only appears to
exhibit on stage3 builds (1.4rc2).

19283 execve("/bin/sed", ["sed", "-e", "s/-O2/-pipe -O2 -g -mcpu=i686
-march=i686 -I/usr/local/include/g", "-e", "s:/usr/local::g", "Makefile.new"],
[/* 131 vars */]) = 0

Notice the -I/usr/local/include in the expression.  I don't yet know where this
is coming from, but I have about six packages now that break.  I've also found
several listed bugs that appear to exhibit the same problems.  I'll add
dependancies in a moment.

Suggestion: change the sed expression to use s|||g or s:::g instead of s///g.
Comment 1 Blu3 2003-02-02 16:32:48 UTC
Suspect bug added to list
Comment 2 Blu3 2003-02-02 16:33:17 UTC
Suspect bug added to list
Comment 3 Blu3 2003-02-02 16:33:50 UTC
Suspect bug added to list
Comment 4 Blu3 2003-02-02 16:36:01 UTC
Suspect bug added to list
Comment 5 Blu3 2003-02-02 17:20:07 UTC
In followup, I still haven't determined why a stage3 build wants to inject a -I/usr/local/include.  I don't know where this came from or why it only shows up on stage 3.

Further, Inspection of ebuilds reveals something of note.  There are a -lot- of ebuilds like the following:

james etc # find /usr/portage/ -type f -name '*ipta*' -exec grep "s/-O2/" {} \; 
-print

        sed -e "s/-O2/${CFLAGS}/g" -e "s:/usr/local::g" Makefile.new > Makefile
/usr/portage/sys-apps/iptables/iptables-1.2.7a-r3.ebuild

Note the use of forward slashes in the first expression.  Any CFLAGS that have a path, i.e. -I or -L/path/to/location will break this expression.  The very nature of gentoo placing everything in /usr prefix and nothing in /usr/local prefix has masked this problem until now.

This is also evidenced by the complains of users in prior bugs noting they had -I/path or -L/path in their *FLAGS.

Easily solved by my prior suggestion.  use | or : instead of /
Comment 6 Blu3 2003-02-02 17:53:30 UTC
The following is a suggestive list some ebuilds that need updating.

find /usr/portage/ -type f -exec grep -l "s/.*/\${CFLAGS}/" {}  \; >/tmp/diff.list

I've no idea if there are other ebuilds doing such dastardly things but I suspect there are a few lingering ebuilds :)

diff.list is attached
Comment 7 Blu3 2003-02-02 17:54:36 UTC
Created attachment 7861 [details]
List of ebuilds with broken sed expressions
Comment 8 Seemant Kulleen (RETIRED) gentoo-dev 2003-02-10 06:18:50 UTC
all the ebuilds you listed are fixed in portage.  Note, I did some other cleanups, and hopefully some space saving in the portage tree.  If you get a chance, please see if there are any wrong sed expressions still remaining.