Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 616334 - www-client/w3m-0.5.3-r9: sed: -e expression #1, char 13: unknown option to `s'
Summary: www-client/w3m-0.5.3-r9: sed: -e expression #1, char 13: unknown option to `s'
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: CJK Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-22 18:01 UTC by causality
Modified: 2017-09-28 17:50 UTC (History)
1 user (show)

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


Attachments
Output of "emerge --info www-client/w3m" (file_616334.txt,6.67 KB, text/plain)
2017-04-22 18:01 UTC, causality
Details
/var/tmp/portage/www-client/w3m-0.5.3-r9/temp/build.log (file_616334.txt,1.46 KB, text/plain)
2017-04-22 18:02 UTC, causality
Details
/var/tmp/portage/www-client/w3m-0.5.3-r9/temp/environment (environment,106.02 KB, text/plain)
2017-04-22 18:04 UTC, causality
Details

Note You need to log in before you can comment on or make changes to this bug.
Description causality 2017-04-22 18:01:15 UTC
Created attachment 470682 [details]
Output of "emerge --info www-client/w3m"

www-client/w3m fails to build due to an error in a "sed" expression in the ebuild file w3m-0.5.3-r9.ebuild.

Text output of "emerge --oneshot www-client/w3m":

Calculating dependencies           ... done!

>>> Verifying ebuild manifests

>>> Emerging (1 of 1) www-client/w3m-0.5.3-r9::gentoo
 * w3m-0.5.3.git20161120.tar.gz SHA256 SHA512 WHIRLPOOL size ;-) ...                                                  [ ok ]
>>> Unpacking source...
>>> Source unpacked in /var/tmp/portage/www-client/w3m-0.5.3-r9/work
>>> Preparing source in /var/tmp/portage/www-client/w3m-0.5.3-r9/work/w3m-0.5.3.git20161120 ...
 * Applying w3m-0.5.3-underlinking.patch ...                                                                          [ ok ]
 * Applying w3m-0.5.3-fix-missing-time.patch ...                                                                      [ ok ]
sed: -e expression #1, char 13: unknown option to `s'
 * ERROR: www-client/w3m-0.5.3-r9::gentoo failed (prepare phase):
 *   (no error message)
 *
 * Call stack:
 *     ebuild.sh, line 115:  Called src_prepare
 *   environment, line 2871:  Called die
 * The specific snippet of code:
 *       sed -i -e "/^AR=/s/ar/$(tc-getAR)/" {.,w3mimg,libwc}/Makefile.in || die;
 *
 * If you need support, post the output of `emerge --info '=www-client/w3m-0.5.3-r9::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=www-client/w3m-0.5.3-r9::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/www-client/w3m-0.5.3-r9/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/www-client/w3m-0.5.3-r9/temp/environment'.
 * Working directory: '/var/tmp/portage/www-client/w3m-0.5.3-r9/work/w3m-0.5.3.git20161120'
 * S: '/var/tmp/portage/www-client/w3m-0.5.3-r9/work/w3m-0.5.3.git20161120'

>>> Failed to emerge www-client/w3m-0.5.3-r9

---

Line 45 of the ebuild file contains the sed expression under the src_prepare section:

src_prepare() {
        default
        ecvs_clean
        sed -i -e "/^AR=/s/ar/$(tc-getAR)/" {.,w3mimg,libwc}/Makefile.in || die
        hprefixify acinclude.m4
        eautoconf
}

----

Oddly, simply removing that "sed" line causes the package to build and install with no errors. This is not exactly an elegant solution (I assume that line was there for a reason).  It's merely a crude workaround.
Comment 1 causality 2017-04-22 18:02:19 UTC
Created attachment 470684 [details]
/var/tmp/portage/www-client/w3m-0.5.3-r9/temp/build.log
Comment 2 causality 2017-04-22 18:04:16 UTC
Created attachment 470686 [details]
/var/tmp/portage/www-client/w3m-0.5.3-r9/temp/environment
Comment 3 Arfrever Frehtes Taifersar Arahesis 2017-04-22 21:47:53 UTC
$(tc-getAR) can contain / characters, so a safer separator should be used for sed command. Example:

sed -i -e "/^AR=/s:ar:$(tc-getAR):" {.,w3mimg,libwc}/Makefile.in || die
Comment 4 Arfrever Frehtes Taifersar Arahesis 2017-09-28 17:50:32 UTC
Fixed:

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d6c75d3aa92d057cc5756786410dfbb8094ce2c2