Line 1440 in /usr/lib/portage/bin/ebuild.sh: "${PORTAGE_BIN_PATH}"/filter-bash-environment.py "${var_grep}" | sed -r \ BSD sed has no -r option, whilst GNU sed has. This particular issue showed when I was installing freebsd-share (notice the slot error too!): ===> zoneinfo (all) Warning: Object directory not changed from original /var/tmp/portage/sys-freebsd/freebsd-share-6.2/work/share/zoneinfo >>> Source compiled. sed: illegal option -- r usage: sed script [-Ealn] [-i extension] [file ...] sed [-Ealn] [-i extension] [-e script] ... [-f script_file] ... [file ...] Traceback (most recent call last): File "/usr/lib/portage/bin/filter-bash-environment.py", line 51, in <module> compile_egrep_pattern(args[0]), file_in, file_out) File "/usr/lib/portage/bin/filter-bash-environment.py", line 34, in filter_bash_environment file_out.write(line) IOError: [Errno 32] Broken pipe >>> Test phase [not enabled]: sys-freebsd/freebsd-share-6.2 >>> Install freebsd-share-6.2 into /var/tmp/portage/sys-freebsd/freebsd-share-6.2/image/ category sys-freebsd >>> Completed installing freebsd-share-6.2 into /var/tmp/portage/sys-freebsd/freebsd-share-6.2/image/ !!! WARNING: Expected SLOT='0', got '' * checking 0 files for package collisions >>> Merging sys-freebsd/freebsd-share-6.2 to / >>> Safely unmerging already-installed instance... SLOT is undefined No package files given... Grabbing a set. SLOT is undefined SLOT is undefined >>> Original instance of package unmerged safely. >>> sys-freebsd/freebsd-share-6.2 merged. >>> No packages selected for removal by clean >>> Auto-cleaning packages... >>> No outdated packages were found on your system. * GNU info directory index is up-to-date. Is there any way we can switch sed to something like ${SED} allowing it to be switched to gsed on gfbsd?
I just now switched out /usr/bin/sed with /usr/bin/gsed .. and it turns out that freebsd-share build will fail because it expects -E (bsd sed not gnu sed) .. joy!
*** Bug 215547 has been marked as a duplicate of this bug. ***
(In reply to comment #0) > > Is there any way we can switch sed to something like ${SED} allowing it to be > switched to gsed on gfbsd? > or just use the right options for BSD or GNU?
Does this still happens? Portage includes a sed wrapper (on /usr/lib/portage/bin/sed, picked by portage's PATH env) that uses gsed for ebuild stuff. However, sys-freebsd makefiles (not ebuilds) should be using the proper /usr/bin/sed (which, iirc, is taken with full path from /usr/share/mk/ .mk files)
Works now .. no issues, thanks!