Skip to contentSkip to conversation

package/swig: swig-wrapper.in: handle symlinks

PATCH Applied Peter Korsgaard 2 participants 3 messages Feb 7 – Feb 13

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/swig: swig-wrapper.in: handle symlinks

Fixes https://autobuild.buildroot.net/results/e656684298b0462f8044667e7384c64d6508f22f/

Use realpath when constructing the path to the real swig so the wrapper works even if it is called through a symlink (E.G. the swig<version> symlinks).

---
 package/swig/swig-wrapper.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/swig/swig-wrapper.in +1 -1
index 61c885fc90..e6cf2df134 100644
@@ -5,4 +5,4 @@ if [ -z "${SWIG_LIB}" ]; then
     export SWIG_LIB="${0%/*}/../share/swig/@SWIG_VERSION@"
 fi
 
-exec "${0}.br_real" "$@"
+exec "$(realpath "${0}").br_real" "$@"
Signature · 6 lines
2.47.3

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 9 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Peter" == Peter Korsgaard <[email protected]> writes:

Fixes https://autobuild.buildroot.net/results/e656684298b0462f8044667e7384c64d6508f22f/
Use realpath when constructing the path to the real swig so the wrapper works even if it is called through a symlink (E.G. the swig<version> symlinks).

Committed, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw
In reply to Peter Korsgaard

In reply of:

Quoted 8 lines

Fixes https://autobuild.buildroot.net/results/e656684298b0462f8044667e7384c64d6508f22f/

Use realpath when constructing the path to the real swig so the wrapper works even if it is called through a symlink (E.G. the swig<version> symlinks).

Applied to 2025.02.x & 2025.11.x. Thanks

Quoted 21 lines
---
 package/swig/swig-wrapper.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/swig/swig-wrapper.in +1 -1
index 61c885fc90..e6cf2df134 100644
@@ -5,4 +5,4 @@ if [ -z "${SWIG_LIB}" ]; then
     export SWIG_LIB="${0%/*}/../share/swig/@SWIG_VERSION@"
 fi
 
-exec "${0}.br_real" "$@"
+exec "$(realpath "${0}").br_real" "$@"
Signature · 6 lines
2.47.3

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot