Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 569086 - dev-db/lmdb-0.9.14: poorly written sed inside src_prepare causes build to fail
Summary: dev-db/lmdb-0.9.14: poorly written sed inside src_prepare causes build to fail
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Eray Aslan
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-22 04:13 UTC by .
Modified: 2016-01-11 20:46 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description . 2015-12-22 04:13:53 UTC
Current state of things:

```
src_prepare() {
    sed -i -e "s/^CC.*/CC = $(tc-getCC)/" \
        -e "s/^CFLAGS.*/CFLAGS = ${CFLAGS}/" \
        -e "s/ar rs/$(tc-getAR) rs/" \
        -e "s:^prefix.*:prefix = /usr:" \
        -e "s:/man/:/share/man/:" \
        -e "/for f/s:lib:$(get_libdir):" \
        -e "s:shared:shared -Wl,-soname,liblmdb.so.0:" \
        "${S}/Makefile" || die
}
```

As you can see, it uses '/' as a separator inside statements containing paths.
Comment 1 Robert Förster 2016-01-11 18:21:36 UTC
no, this is expected and working, "for f" is the pattern to search for as we don't want to edit every occurrence of "lib" in the Makefile
Comment 2 Patrice Clement gentoo-dev 2016-01-11 18:33:43 UTC
If this is expected, there's nothing to worry about then.
Comment 3 . 2016-01-11 19:27:33 UTC
Ok, it seems I have to point it out explicitly.


```
src_prepare() {
    sed -i -e "s/^CC.*/CC = $(tc-getCC)/" \      <---------- HERE
        -e "s/^CFLAGS.*/CFLAGS = ${CFLAGS}/" \   <---------- NOT SURE
        -e "s/ar rs/$(tc-getAR) rs/" \           <---------- HERE
        -e "s:^prefix.*:prefix = /usr:" \
        -e "s:/man/:/share/man/:" \
        -e "/for f/s:lib:$(get_libdir):" \
        -e "s:shared:shared -Wl,-soname,liblmdb.so.0:" \
        "${S}/Makefile" || die
}
```
Comment 4 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2016-01-11 20:46:52 UTC
InGit.