Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 24237

Summary: Usage of sed -i in ebuilds
Product: Gentoo Linux Reporter: Derk-Jan Hartman <thedj>
Component: New packagesAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED DUPLICATE    
Severity: normal CC: taviso
Priority: High    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---

Description Derk-Jan Hartman 2003-07-10 09:24:25 UTC
I was walking trough some ebuilds and suddenly came accross one that was using sed -i 
to do a substitution on a file.

-i option is not very portable. This is gonna create some problems with at least the 
upcoming macosx porting effort, since Darwin's sed doesn't support -i.
Grepping trough my portage dir i found hundreds of occurences of this syntax. All these 
occurences ought to be replace with something like the following:

sed "s:tosub:thesub:" configure.orig > configure

Reproducible: Always
Steps to Reproduce:
Comment 1 Tavis Ormandy (RETIRED) gentoo-dev 2003-07-10 12:21:03 UTC
Can GNU sed be built on OSX? if so, this is no big deal, OSX users just get a wrapper scipt in /usr/lib/portage/bin, or whatever the equivalent is on osx.

just adding my 2p :)
Comment 2 Mr. Bones. (RETIRED) gentoo-dev 2003-07-10 13:36:57 UTC

*** This bug has been marked as a duplicate of 24208 ***