[wpt-sync] Sync PR 33666 - [tools] Supports symlinks on utils.unzip()
Categories
(Testing :: web-platform-tests, task, P4)
Tracking
(firefox102 fixed)
Tracking | Status | |
---|---|---|
firefox102 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 33666 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/33666
Details from upstream follow.
Carlos Alberto Lopez Perez <clopez@igalia.com> wrote:
[tools] Supports symlinks on utils.unzip()
Python
ZipFile.extract()
doesn't support symlinks and instead of creating the symlink it creates a text file with the path to the target symlink.Implement the support for creating the symlinks by manually calling os.symlink() when the file attributes indicate it is a symlink.
This fixes the WebKitGTK runs on wpt.fyi that broke recently when the MiniBrowser WebKitGTK bundles have started to include symlinks inside the zip files.
See, for example this log:
/home/test/web-platform-tests/_venv3/browsers/nightly/webkitgtk_minibrowser/bin/WebKitWebDriver: error while loading shared libraries: /home/test/web-platform-tests/_venv3/browsers/nightly/webkitgtk_minibrowser/sys/lib/libgio-2.0.so.0: file too short
This
file too short
error is caused because the libraries that link with the binary are text files instead of symlinks.
The zip file MiniBrowser_gtk_r249711@main.zip contains inside this libraries and symlinks but the current code to unzip the files is creating this (text files instead of symlinks)
Assignee | ||
Comment 1•3 years ago
|
||
Description
•