summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2018-07-25 16:45:23 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-07-25 16:46:47 +0100
commitb247392b4ced57cfe694656032f6a6723740a9e8 (patch)
tree04c955fb568206ab7411190ea15d34cade000e02 /scripts
parent39c1719a32ed5567e3bf2df5c4f9068d0f5a9400 (diff)
downloadopenembedded-core-contrib-b247392b4ced57cfe694656032f6a6723740a9e8.tar.gz
openembedded-core-contrib-b247392b4ced57cfe694656032f6a6723740a9e8.tar.bz2
openembedded-core-contrib-b247392b4ced57cfe694656032f6a6723740a9e8.zip
Revert "relocate_sdk.py: remove hardcoded SDK path"
This reverts commit 6671a4d980c8bef8f402780a308f6c43a25044aa. This breaks uninative tarball since the call of relocate_sdk.py from uninative.bbclass wasn't updated to account for this change. It isn't clear what value that code could pass in and this isn't simple to fix so revert until a better fix can be found that doesn't break uninative. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/relocate_sdk.py17
1 files changed, 8 insertions, 9 deletions
diff --git a/scripts/relocate_sdk.py b/scripts/relocate_sdk.py
index 0d5a6f5161..c752fa2c61 100755
--- a/scripts/relocate_sdk.py
+++ b/scripts/relocate_sdk.py
@@ -38,6 +38,8 @@ else:
def b(x):
return x.encode(sys.getfilesystemencoding())
+old_prefix = re.compile(b("##DEFAULT_INSTALL_DIR##"))
+
def get_arch():
f.seek(0)
e_ident =f.read(16)
@@ -210,22 +212,19 @@ def change_dl_sysdirs(elf_file_name):
f.write(sysdirslen)
# MAIN
-if len(sys.argv) < 5:
+if len(sys.argv) < 4:
sys.exit(-1)
# In python > 3, strings may also contain Unicode characters. So, convert
# them to bytes
if sys.version_info < (3,):
- new_prefix = sys.argv[2]
- new_dl_path = sys.argv[3]
+ new_prefix = sys.argv[1]
+ new_dl_path = sys.argv[2]
else:
- new_prefix = sys.argv[2].encode()
- new_dl_path = sys.argv[3].encode()
-
-executables_list = sys.argv[4:]
+ new_prefix = sys.argv[1].encode()
+ new_dl_path = sys.argv[2].encode()
-old_prefix_ne = b(sys.argv[1])
-old_prefix = re.compile(re.escape(old_prefix_ne));
+executables_list = sys.argv[3:]
for e in executables_list:
perms = os.stat(e)[stat.ST_MODE]