Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 600478 - dev-vcs/cvs-1.12.12-r11: sed edit in ebuild failed because '/' is used as a field separator
Summary: dev-vcs/cvs-1.12.12-r11: sed edit in ebuild failed because '/' is used as a f...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-22 13:14 UTC by Jiří Moravec
Modified: 2017-08-30 18:41 UTC (History)
0 users

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


Attachments
Patch replacing '/' separator with ':' (cvs-1.12.12-r11.ebuild.patch,386 bytes, patch)
2016-11-22 13:16 UTC, Jiří Moravec
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jiří Moravec 2016-11-22 13:14:41 UTC
With 'AR=/usr/bin/gcc-ar' line in my /etc/portage/make.conf, prepare phase of ebuild failed with message: "sed: -e expression #1, char 12: unknown option to `s'"

The specific snippet of code:
sed -i "/^AR/s/ar/$(tc-getAR)/" diff/Makefile.in lib/Makefile.in || die

This is because sed command argument is expanded into
/^AR/s/ar//usr/bin/gcc-ar/ which is wrong. It's necessary to replace '/' character in sed expression with another one, which is not present in AR command fullname, like ':'

I'm afraid that this is problem for every ebuild in portage, which is using '/' as a field separator in sed expressions for $(tc-getSOMETHING) when this variable contain '/' character(s).
Comment 1 Jiří Moravec 2016-11-22 13:16:54 UTC
Created attachment 454046 [details, diff]
Patch replacing '/' separator with ':'
Comment 2 Pacho Ramos gentoo-dev 2017-08-30 18:41:28 UTC
[master 86302ebca66] dev-vcs/cvs: Use proper sed separators (#600478 by Jiří Moravec)
 1 file changed, 1 insertion(+), 2 deletions(-)