Skip to contentSkip to conversation

Revert "sdk: fix relocate symlink failed"

PATCH In review gr embeter 2 participants 5 messages Sep 1, 2021 – Sep 2, 2021

lore
Share & tools
lore

gr embeter

author
#0 lore raw

PATCH 1/1 Revert "sdk: fix relocate symlink failed"

This reverts commit a155c4d4ca841ef492213a5f0b9121703c62e2b4.

Otherwise, SDK installing fails with:

Extracting SDK...........................................................done Setting it up...sed: -e expression #1, char 0: no previous regular expression
sed: -e expression #1, char 0: no previous regular expression
... tonns of lines ...
sed: -e expression #1, char 0: no previous regular expression done
SDK has been successfully set up and is ready to be used.

Original commit message mentions commit bc4ee54535 ("sdk: Decouple default install path from built in path"), that is not part of dunfell. Hence, revert this fix.

---
 meta/files/toolchain-shar-relocate.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/files/toolchain-shar-relocate.sh +1 -1
index ba873373e29e..54337412966c 100644
@@ -72,7 +72,7 @@ fi
 
 # change all symlinks pointing to @SDKPATH@
 for l in $($SUDO_EXEC find $native_sysroot -type l); do
-	$SUDO_EXEC ln -sfn $(readlink $l|$SUDO_EXEC sed -e "s:$SDK_BUILD_PATH:$target_sdk_dir:") $l
+	$SUDO_EXEC ln -sfn $(readlink $l|$SUDO_EXEC sed -e "s:$DEFAULT_INSTALL_DIR:$target_sdk_dir:") $l
 	if [ $? -ne 0 ]; then
 		echo "Failed to setup symlinks. Relocate script failed. Abort!"
 		exit 1
Signature · 1 line
2.30.2
author
#1 lore raw

Hi Steve,

I observe the same sed messages in hardknott, would you please consider applying it there as well?

Quoted 38 lines · grygorii tertychnyi

This reverts commit a155c4d4ca841ef492213a5f0b9121703c62e2b4.

Otherwise, SDK installing fails with:

Extracting SDK...........................................................done Setting it up...sed: -e expression #1, char 0: no previous regular expression
sed: -e expression #1, char 0: no previous regular expression
... tonns of lines ...
sed: -e expression #1, char 0: no previous regular expression done
SDK has been successfully set up and is ready to be used.

Original commit message mentions commit bc4ee54535 ("sdk: Decouple default install path from built in path"), that is not part of dunfell. Hence, revert this fix.

---
 meta/files/toolchain-shar-relocate.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/files/toolchain-shar-relocate.sh +1 -2
index ba873373e29e..54337412966c 100644
@@ -72,7 +72,7 @@ fi
 
 # change all symlinks pointing to @SDKPATH@
 for l in $($SUDO_EXEC find $native_sysroot -type l); do
-       $SUDO_EXEC ln -sfn $(readlink $l|$SUDO_EXEC sed -e "s:$SDK_BUILD_PATH:$target_sdk_dir:") $l
+       $SUDO_EXEC ln -sfn $(readlink $l|$SUDO_EXEC sed -e "s:$DEFAULT_INSTALL_DIR:$target_sdk_dir:") $l
        if [ $? -ne 0 ]; then
                echo "Failed to setup symlinks. Relocate script failed. Abort!"
                exit 1
--

2.30.2

#2 lore raw
In reply to gr embeter
Quoted 13 lines · grygorii tertychnyi

This reverts commit a155c4d4ca841ef492213a5f0b9121703c62e2b4.

Otherwise, SDK installing fails with:

Extracting SDK...........................................................done Setting it up...sed: -e expression #1, char 0: no previous regular expression
sed: -e expression #1, char 0: no previous regular expression
... tonns of lines ...
sed: -e expression #1, char 0: no previous regular expression done
SDK has been successfully set up and is ready to be used.

Quoted 3 lines

Original commit message mentions commit bc4ee54535 ("sdk: Decouple default install path from built in path"), that is not part of dunfell. Hence, revert this fix.

Have you by any chance tried with the above mentioned patch to see if the pair of patches works in dunfell?

This patch was intended to fix:
https://bugzilla.yoctoproject.org/show_bug.cgi?id=14444

It does seem to fix the issue in master, which has both patches.

Steve

Quoted 22 lines
---
 meta/files/toolchain-shar-relocate.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/files/toolchain-shar-relocate.sh +1 -2
index ba873373e29e..54337412966c 100644
@@ -72,7 +72,7 @@ fi
 
 # change all symlinks pointing to @SDKPATH@
 for l in $($SUDO_EXEC find $native_sysroot -type l); do
-       $SUDO_EXEC ln -sfn $(readlink $l|$SUDO_EXEC sed -e "s:$SDK_BUILD_PATH:$target_sdk_dir:") $l
+       $SUDO_EXEC ln -sfn $(readlink $l|$SUDO_EXEC sed -e "s:$DEFAULT_INSTALL_DIR:$target_sdk_dir:") $l
        if [ $? -ne 0 ]; then
                echo "Failed to setup symlinks. Relocate script failed. Abort!"
                exit 1
--

2.30.2

#3 lore raw
In reply to gr embeter
Quoted 5 lines · grygorii tertychnyi

This reverts commit a155c4d4ca841ef492213a5f0b9121703c62e2b4.

Otherwise, SDK installing fails with:

Quoted 7 lines

Extracting SDK...........................................................done Setting it up...sed: -e expression #1, char 0: no previous regular expression
sed: -e expression #1, char 0: no previous regular expression
... tonns of lines ...
sed: -e expression #1, char 0: no previous regular expression done
SDK has been successfully set up and is ready to be used.

I can confirm the above noise from sed in dunfell, though the SDK does seem to be set up successfully as the above message indicates. I have verified that I can use the resulting sdk to build a test app.

Also I can confirm that
https://bugzilla.yoctoproject.org/show_bug.cgi?id=14444 is fixed with "sdk: fix relocate symlink failed" (in both master and dunfell)

Quoted 3 lines

Original commit message mentions commit bc4ee54535 ("sdk: Decouple default install path from built in path"), that is not part of dunfell. Hence, revert this fix.

Adding "sdk: Decouple default install path from built in path" to dunfell eliminates the sed noise you were encountering.

So I think we want both "sdk: fix relocate symlink failed" and "sdk:
Decouple default install path from built in path" in dufell.

Thoughts Richard? I know you were worrying about this.

Steve

Quoted 21 lines
---
 meta/files/toolchain-shar-relocate.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/files/toolchain-shar-relocate.sh +1 -2
index ba873373e29e..54337412966c 100644
@@ -72,7 +72,7 @@ fi
 
 # change all symlinks pointing to @SDKPATH@
 for l in $($SUDO_EXEC find $native_sysroot -type l); do
-       $SUDO_EXEC ln -sfn $(readlink $l|$SUDO_EXEC sed -e "s:$SDK_BUILD_PATH:$target_sdk_dir:") $l
+       $SUDO_EXEC ln -sfn $(readlink $l|$SUDO_EXEC sed -e "s:$DEFAULT_INSTALL_DIR:$target_sdk_dir:") $l
        if [ $? -ne 0 ]; then
                echo "Failed to setup symlinks. Relocate script failed. Abort!"
                exit 1
--

2.30.2

author
#4 lore raw
Quoted 15 lines · Steve Sakoman
Quoted 5 lines · grygorii tertychnyi

This reverts commit a155c4d4ca841ef492213a5f0b9121703c62e2b4.

Otherwise, SDK installing fails with:

Quoted 7 lines

Extracting SDK...........................................................done Setting it up...sed: -e expression #1, char 0: no previous regular expression
sed: -e expression #1, char 0: no previous regular expression
... tonns of lines ...
sed: -e expression #1, char 0: no previous regular expression done
SDK has been successfully set up and is ready to be used.

Quoted 3 lines

I can confirm the above noise from sed in dunfell, though the SDK does seem to be set up successfully as the above message indicates. I have verified that I can use the resulting sdk to build a test app.

Actually, in my case all symlinks are wrong. I installed the SDK in a non-default
path with "-y -d <path>" but all symlinks point to default path:

» l ./sysroots/x86_64-leicasdk-linux/bin/zcat
lrwxrwxrwx 1 gr grygorii 61 2021-09-02 08:37 ./sysroots/x86_64-leicasdk-linux/bin/zcat -> /opt/geosurv/3.1/sysroots/x86_64-leicasdk-linux/bin/zcat.gzip

instead of

» l ./sysroots/x86_64-leicasdk-linux/bin/zcat
lrwxrwxrwx 1 gr grygorii 67 2021-09-02 08:26 ./sysroots/x86_64-leicasdk-linux/bin/zcat -> /geo/wok/1/sdk-try/sdk/sysroots/x86_64-leicasdk-linux/bin/zcat.gzip

So, it breaks our workflow now.

Quoted 3 lines

Also I can confirm that
https://bugzilla.yoctoproject.org/show_bug.cgi?id=14444 is fixed with "sdk: fix relocate symlink failed" (in both master and dunfell)

Are you sure it is "sdk: fix relocate symlink failed"
https://git.openembedded.org/openembedded-core/commit/?id=a155c4d4ca841ef492213a5f0b9121703c62e2b4?
It does not look related to this bug.

Quoted 9 lines
Quoted 3 lines

Original commit message mentions commit bc4ee54535 ("sdk: Decouple default install path from built in path"), that is not part of dunfell. Hence, revert this fix.

Adding "sdk: Decouple default install path from built in path" to dunfell eliminates the sed noise you were encountering.

So I think we want both "sdk: fix relocate symlink failed" and "sdk:
Decouple default install path from built in path" in dufell.

I confirm that adding "sdk: Decouple default install path from built in path" to dunfell fixes "sed" issues.

So, most probably instead of reverting "sdk: fix relocate symlink failed" we need to add "sdk: Decouple default install path from built in path" to dunfell.

And handknott : )

Quoted 26 lines

Thoughts Richard? I know you were worrying about this.

Steve

Quoted 21 lines
---
 meta/files/toolchain-shar-relocate.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/files/toolchain-shar-relocate.sh +1 -2
index ba873373e29e..54337412966c 100644
@@ -72,7 +72,7 @@ fi
 
 # change all symlinks pointing to @SDKPATH@
 for l in $($SUDO_EXEC find $native_sysroot -type l); do
-       $SUDO_EXEC ln -sfn $(readlink $l|$SUDO_EXEC sed -e "s:$SDK_BUILD_PATH:$target_sdk_dir:") $l
+       $SUDO_EXEC ln -sfn $(readlink $l|$SUDO_EXEC sed -e "s:$DEFAULT_INSTALL_DIR:$target_sdk_dir:") $l
        if [ $? -ne 0 ]; then
                echo "Failed to setup symlinks. Relocate script failed. Abort!"
                exit 1
--

2.30.2