.gitignore: add more items to .gitignore
PATCH 1/2 .gitignore: add more items to .gitignore
From: Chen Qi <[email protected]>
The change references meta-openembedded/.gitignore.
--- .gitignore | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
.gitignore +5 -1
@@ -1,3 +1,7 @@ *.pyc *.pyo - +/*.patch +*.swp +*.orig +*.rej +*~
Signature · 1 line
2.43.0
PATCH 2/2 mingw_sdk_handle_symlink.bbclass: ensure no symlink
From: Chen Qi <[email protected]>
Previously, I deliberately left these dead links as they were. The purpose was to give users more information. However, this is not correct. Because on Windows, extracting the SDK will give users error about these symlinks.
This patch fixes the above error by:
1. Remove original invalid/dead symlinks.
2. Remove newly generated symlinks.
This might be a little confusing. Normally, there will be no such newly generated symlinks. But in case of multilib, there will be something like xxx/64/32/64. The last 64 is a dead symlink and it's useless.
--- classes/mingw_sdk_handle_symlink.bbclass | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
classes/mingw_sdk_handle_symlink.bbclass +11 -1
@@ -6,10 +6,13 @@ archive_sdk:prepend:sdkmingw32 () { find "${SDK_OUTPUT}/${SDKPATH}" -type l -print | while read -r symlink; do target=$(readlink -f "$symlink" || echo "NOTVALID") if [ "$target" = "NOTVALID" ]; then + bbnote "Deleting invalid symlink: $symlink" + rm -f $symlink continue fi if [ ! -e "$target" ]; then - continue + bbnote "Deleting dead symlink: $symlink" + rm -f $symlink elif [ -d "$target" ]; then if [ "$parse_type" = "directory" ]; then rm "$symlink" && cp -r "$target" "$symlink"
@@ -21,5 +24,12 @@ archive_sdk:prepend:sdkmingw32 () { fi done done + # With the above symlink handling, we've copied correct contents. + # But we still face possible newly generated symlinks in the above process. + # For example, in case of multilib, there will be links like below: + # x86-64-v3-poky-linux/lib64/x86_64-poky-linux/15.2.0/32/64/32 + # This xxx/32/64/32 is a useless dead link and we can just remove it. + # Anyway, all these newly generated symlinks can be deleted! + find "${SDK_OUTPUT}/${SDKPATH}" -type l -delete fi }
Signature · 1 line
2.43.0