| Message ID | 20260116050512.3751871-1-Qi.Chen@windriver.com |
|---|---|
| State | New |
| Headers | show |
| Series | [meta-mingw] mingw_sdk_handle_symlink.bbclass: avoid using non-posix -d option for read | expand |
On Thu, Jan 15, 2026 at 10:05 PM <Qi.Chen@windriver.com> wrote: > > From: Chen Qi <Qi.Chen@windriver.com> > > The '-d' option for read is bash specific extension. We need to > avoid using it. > > Signed-off-by: Chen Qi <Qi.Chen@windriver.com> > --- > classes/mingw_sdk_handle_symlink.bbclass | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/classes/mingw_sdk_handle_symlink.bbclass b/classes/mingw_sdk_handle_symlink.bbclass > index 2f6dbe6..e158d14 100644 > --- a/classes/mingw_sdk_handle_symlink.bbclass > +++ b/classes/mingw_sdk_handle_symlink.bbclass > @@ -3,7 +3,7 @@ WINSDK_NO_SYMLINK ?= "0" > archive_sdk:prepend:sdkmingw32 () { > if [ "${WINSDK_NO_SYMLINK}" = "1" ]; then > for parse_type in "file" "directory"; do > - find "${SDK_OUTPUT}/${SDKPATH}" -type l -print0 | while IFS= read -r -d '' symlink; do > + find "${SDK_OUTPUT}/${SDKPATH}" -type l -print | while read -r symlink; do This would now break on file names with spaces in them; As much as I would like to say "don't do that", is there some we we can preserve the behavior of using -print0 to allow that to keep working? > target=$(readlink -f "$symlink" || echo "NOTVALID") > if [ "$target" = "NOTVALID" ]; then > continue > -- > 2.43.0 >
diff --git a/classes/mingw_sdk_handle_symlink.bbclass b/classes/mingw_sdk_handle_symlink.bbclass index 2f6dbe6..e158d14 100644 --- a/classes/mingw_sdk_handle_symlink.bbclass +++ b/classes/mingw_sdk_handle_symlink.bbclass @@ -3,7 +3,7 @@ WINSDK_NO_SYMLINK ?= "0" archive_sdk:prepend:sdkmingw32 () { if [ "${WINSDK_NO_SYMLINK}" = "1" ]; then for parse_type in "file" "directory"; do - find "${SDK_OUTPUT}/${SDKPATH}" -type l -print0 | while IFS= read -r -d '' symlink; do + find "${SDK_OUTPUT}/${SDKPATH}" -type l -print | while read -r symlink; do target=$(readlink -f "$symlink" || echo "NOTVALID") if [ "$target" = "NOTVALID" ]; then continue