fix buildroot sed handling on Mac OS X
PATCH 1/3 fix buildroot sed handling on Mac OS X
Improve the checking of sed by adding some common GNU sed installation names (gsed/gnused), checking for a basic OS X sed feature in command line option handling, checking the actual result of the sed run against the expected result, and placing common code for the check under toolchain/dependencies/.
-- Heikki Lindholm
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: buildroot-070225-sed-check.patch
Url: http://busybox.net/lists/buildroot/attachments/20070225/a7aa3d03/attachment.pot
PATCH 1/3 fix buildroot sed handling on Mac OS X
Quoted 20 lines · Heikki Lindholm
Improve the checking of sed by adding some common GNU sed installation names (gsed/gnused), checking for a basic OS X sed feature in command line option handling, checking the actual result of the sed run against the expected result, and placing common code for the check under toolchain/dependencies/.
-- Heikki Lindholm
diff -Nru
buildroot/package/sed/sedcheck.shbuildroot-devel/package/sed/sedcheck.shpackage/sed/sedcheck.sh +1
-2@@ -2,24 +2,10 @@ # Make sure the host sed supports '-i' (in-place). # If it doesn't, we'll build and use our own. +SED=$(toolchain/dependencies/check-host-sed.sh) -if test -x /usr/bin/sed ; then - SED="/usr/bin/sed"
package/sed/sedcheck.sh line 17
Quoted 10 lines
package/sed/sedcheck.sh +0
-10-else - if test -x /bin/sed ; then - SED="/bin/sed" - else - SED="sed" - fi -fi - -echo "HELLO" > .sedtest -$SED -i -e "s/HELLO/GOODBYE/" .sedtest >/dev/null 2>&1
Why don't you mv check-host-sed.sh here instead and use it in dependencies.sh? I'd prefer it this way..
cheers,
PATCH 1/3 fix buildroot sed handling on Mac OS X
Bernhard Fischer kirjoitti:
Quoted 21 lines · Heikki Lindholm
Quoted 20 lines
Improve the checking of sed by adding some common GNU sed installation names (gsed/gnused), checking for a basic OS X sed feature in command line option handling, checking the actual result of the sed run against the expected result, and placing common code for the check under toolchain/dependencies/.
-- Heikki Lindholm
diff -Nru
buildroot/package/sed/sedcheck.shbuildroot-devel/package/sed/sedcheck.shpackage/sed/sedcheck.sh +1
-0@@ -2,24 +2,10 @@ # Make sure the host sed supports '-i' (in-place). # If it doesn't, we'll build and use our own. +SED=$(toolchain/dependencies/check-host-sed.sh)
Quoted 16 lines
package/sed/sedcheck.sh line 17
Quoted 12 lines
package/sed/sedcheck.sh +0
-12-if test -x /usr/bin/sed ; then - SED="/usr/bin/sed" -else - if test -x /bin/sed ; then - SED="/bin/sed" - else - SED="sed" - fi -fi - -echo "HELLO" > .sedtest -$SED -i -e "s/HELLO/GOODBYE/" .sedtest >/dev/null 2>&1Why don't you mv
check-host-sed.shhere instead and use it independencies.sh? I'd prefer it this way..
Well. I tossed a coin on the placement. I thought checking the host sed would belong better to something build-framework-ish than the sed package. I'll do a respin of this if you like.
-- Heikki Lindholm
Bernhard Fischer
AppliedPATCH 1/3 fix buildroot sed handling on Mac OS X
Quoted 8 lines · Heikki Lindholm
Bernhard Fischer kirjoitti:
Quoted 7 lines · Heikki Lindholm
Quoted 6 lines
Improve the checking of sed by adding some common GNU sed installation names (gsed/gnused), checking for a basic OS X sed feature in command line option handling, checking the actual result of the sed run against the expected result, and placing common code for the check under toolchain/dependencies/.
Applied. Will most likely be moved from diff to cmp since we already use cmp (IIRC, didn't look). Care to verify if cmp is already used and if so, use cmp instead?
TIA,
PATCH 1/3 fix buildroot sed handling on Mac OS X
Bernhard Fischer kirjoitti:
Quoted 14 lines · Heikki Lindholm
Quoted 11 lines
Bernhard Fischer kirjoitti:
Quoted 8 lines · Heikki Lindholm
Quoted 7 lines
Improve the checking of sed by adding some common GNU sed installation names (gsed/gnused), checking for a basic OS X sed feature in command line option handling, checking the actual result of the sed run against the expected result, and placing common code for the check under toolchain/dependencies/.
Quoted 3 lines
Applied. Will most likely be moved from diff to cmp since we already use cmp (IIRC, didn't look). Care to verify if cmp is already used and if so, use cmp instead?
I found no cmp usage in buildroot. How about just using the shell as in the attached patch?
-- Heikki Lindholm
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: buildroot-070309-sed-diff.patch
Url: http://busybox.net/lists/buildroot/attachments/20070309/68d32a7a/attachment.pot