Title: [292584] trunk/Tools
- Revision
- 292584
- Author
- [email protected]
- Date
- 2022-04-07 17:51:43 -0700 (Thu, 07 Apr 2022)
Log Message
REGRESSION(r292109): [GTK][WPE] generate-bundle: Don't try to use the interpreter prefix when not bundling all.
https://bugs.webkit.org/show_bug.cgi?id=237107
For bundles of type --syslibs=generate-install-script we should
not try to prefix the executable with the interpreter.
Add a missing check to ensure that the interpreter has been copied
into the bundle before trying to use it.
Unreviewed follow-up fix.
* Scripts/webkitpy/binary_bundling/bundle.py:
(BinaryBundler.generate_wrapper_script):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (292583 => 292584)
--- trunk/Tools/ChangeLog 2022-04-08 00:49:58 UTC (rev 292583)
+++ trunk/Tools/ChangeLog 2022-04-08 00:51:43 UTC (rev 292584)
@@ -1,3 +1,18 @@
+2022-04-07 Carlos Alberto Lopez Perez <[email protected]>
+
+ REGRESSION(r292109): [GTK][WPE] generate-bundle: Don't try to use the interpreter prefix when not bundling all.
+ https://bugs.webkit.org/show_bug.cgi?id=237107
+
+ For bundles of type --syslibs=generate-install-script we should
+ not try to prefix the executable with the interpreter.
+ Add a missing check to ensure that the interpreter has been copied
+ into the bundle before trying to use it.
+
+ Unreviewed follow-up fix.
+
+ * Scripts/webkitpy/binary_bundling/bundle.py:
+ (BinaryBundler.generate_wrapper_script):
+
2022-04-07 Jonathan Bedard <[email protected]>
[Merge-Queue] Add PushCommitToWebKitRepo
Modified: trunk/Tools/Scripts/webkitpy/binary_bundling/bundle.py (292583 => 292584)
--- trunk/Tools/Scripts/webkitpy/binary_bundling/bundle.py 2022-04-08 00:49:58 UTC (rev 292583)
+++ trunk/Tools/Scripts/webkitpy/binary_bundling/bundle.py 2022-04-08 00:51:43 UTC (rev 292584)
@@ -213,11 +213,14 @@
dlopenwrap_libname = 'dlopenwrap.so'
if os.path.isfile(os.path.join(lib_dir, dlopenwrap_libname)):
script_handle.write('export LD_PRELOAD="${%s}/lib/%s"\n' % (self.VAR_MYDIR, dlopenwrap_libname))
- # If we have patched the binaries to use a relative relpath then load the binary directly without prefixing it with the interpreter (it allows the process to use the correct progname)
- if self._has_patched_interpreter_relpath:
+
+ # Prefix the program with the interpreter when we are bundling all (interpreter is copied) and the path to the interpreter isn't patched.
+ # Otherwise prefer to not prefix it, because that allow the process to use a more meaningful progname.
+ interpreter_basename = os.path.basename(interpreter)
+ if os.path.isfile(os.path.join(lib_dir, interpreter_basename)) and not self._has_patched_interpreter_relpath:
+ script_handle.write('INTERPRETER="${%s}/lib/%s"\n' % (self.VAR_MYDIR, interpreter_basename))
+ script_handle.write('exec "${INTERPRETER}" "${%s}/bin/%s" "$@"\n' % (self.VAR_MYDIR, binary_to_wrap))
+ else:
script_handle.write('exec "${%s}/bin/%s" "$@"\n' % (self.VAR_MYDIR, binary_to_wrap))
- else:
- script_handle.write('INTERPRETER="${%s}/lib/%s"\n' % (self.VAR_MYDIR, os.path.basename(interpreter)))
- script_handle.write('exec "${INTERPRETER}" "${%s}/bin/%s" "$@"\n' % (self.VAR_MYDIR, binary_to_wrap))
os.chmod(script_file, 0o755)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes