Brifely, ebuild.sh relies on sed for a couple of non-trivial usages- removing directories from the PATH statement (ccache and diistcc), and unpacking files. If sed is ever broken, this break portage- it's unable to even unpack it's src if it's a tar.{bz2,gz}. This isn't hard to modify however, I've gone through and converted the sed usage over to bash. I'm also filing a bug w/ base-system enabling sed to bootstrap itself, since our current version requires sed (configure scripts use sed), and is unwilling to use the bootstrap script to build a temporary sed if one is lacking. The modifications to ebuild.sh are minor, and cover the final cleanup for enabling sed to build w/out an initial sed binary. Removing unpack's reliance on sed is fairly use imo. Adding the 'sed requires sed' bug as being blocked by this- the sed modification is worthless if the ebuild is unable to unpack it's src.
Created attachment 25177 [details, diff] ebuild.sh patch to replace sed usage w/ appropriate bash I've been using it for the last few hours, and have used it to emerge sed when I'd previously blown it away (intentionally :). Only thing that's mildly questionable in my books is the function remove_path_entry ; it's usage is rather limited currently, might be better just to incorporate the tweaks directly into the relevant sections. That and it might wise to store the previous contents of IFS, not sure on that one though.
Created attachment 25205 [details, diff] ebuild.sh-sedless.patch v2 Fixed ls_ret assignment, and corrected an extra newline coming through for the echo statement.
Created attachment 25291 [details, diff] ebuild.sh sedless patch v3 Fixed remove_path_entry function setting PATH w/ a lead : Thanks to nakano and genone for pointing out this and the previous issues. remove_path_entry was made a bit more useful also, it can now be passed multiple anchor's to search for, and remove.
In "if has suidctl $FEATURES > /dev/null ; then", it doesn't work properly. It should be like this: - ls -ldh "${i}" | awk '{print "## "$0}' | sed s:"${IMAGE}"::g >> ${sfconf} - echo "#${i/${IMAGE}/}" >> ${sfconf} + ls_ret=`ls -ldh "${i}"` + echo "## ${ls_ret%${IMAGE}*}${ls_ret#*${IMAGE}}" >> ${sfconf} + echo "#${i/${IMAGE}/}" >> ${sfconf} What do you think?
Created attachment 26371 [details, diff] ebuild.sh-sedless.patch v4 Hmm. I really managed to bork portions of this, didn't I? heh. gah... Added the missing echo statement, I also adjusted the beeping order of the suidctl complaints- no point in having the terminal beep at the user w/out having a relevant message displayed (originally it beeped, then would display the suid complaint and continue on). Straying from the topic of this bug slightly, I wonder about the use of -s for testing if the suidctrl.conf exists. Wouldn't that be better server by a -f?
'chmod ugo-s "${i}"' should be after the timer...
It's in CVS. Thanks.
Closing, it's in portage-2.0.51_pre9 (it appeared earlier, just don't recall the version :)