Bug 221266

Summary: [webkitcorepy] Autoinstaller can fail on packages containing write protected files
Product: WebKit Reporter: Don Olmstead <don.olmstead>
Component: Tools / TestsAssignee: Don Olmstead <don.olmstead>
Status: RESOLVED FIXED    
Severity: Normal CC: jbedard, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Don Olmstead
Reported 2021-02-02 09:24:05 PST
This is kind of a fringe issue that I've had happen to me a few times. One of the packages, logilab.common, contains a write-protected file. Looks like if an autoinstall of a package fails the temp directory the tar is extracted to is still present. When the install is run again the tar can't be extracted because the write protected file is present and its being written to. Traceback (most recent call last): File "C:\webkit\Tools\Scripts\webkitpy\test\main.py", line 321, in <module> sys.exit(main()) File "C:\webkit\Tools\Scripts\webkitpy\test\main.py", line 76, in main return not tester.run() File "C:\webkit\Tools\Scripts\webkitpy\test\main.py", line 149, in run return self._run_tests(names) File "C:\webkit\Tools\Scripts\webkitpy\test\main.py", line 156, in _run_tests AutoInstall.install_everything() File "C:\webkit\Tools\Scripts\libraries\webkitcorepy\webkitcorepy\autoinstall.py", line 512, in install_everything package.install() File "C:\webkit\Tools\Scripts\libraries\webkitcorepy\webkitcorepy\autoinstall.py", line 241, in install archive.unpack(temp_location) File "C:\webkit\Tools\Scripts\libraries\webkitcorepy\webkitcorepy\autoinstall.py", line 90, in unpack file.extractall(target) File "C:\Users\eolmstead\Documents\webkit-trunk\tools\python3\lib\tarfile.py", line 2034, in extractall self.extract(tarinfo, path, set_attrs=not tarinfo.isdir(), File "C:\Users\eolmstead\Documents\webkit-trunk\tools\python3\lib\tarfile.py", line 2075, in extract self._extract_member(tarinfo, os.path.join(path, tarinfo.name), File "C:\Users\eolmstead\Documents\webkit-trunk\tools\python3\lib\tarfile.py", line 2147, in _extract_member self.makefile(tarinfo, targetpath) File "C:\Users\eolmstead\Documents\webkit-trunk\tools\python3\lib\tarfile.py", line 2188, in makefile with bltn_open(targetpath, "wb") as target: PermissionError: [Errno 13] Permission denied: 'C:\\Users\\EOLMST~1\\AppData\\Local\\Temp\\2\\logilab.common\\logilab-common-1.8.1\\test\\data\\write_protected_file.txt'
Attachments
Patch (1.98 KB, patch)
2021-02-02 12:04 PST, Don Olmstead
no flags
Don Olmstead
Comment 1 2021-02-02 12:04:41 PST
EWS
Comment 2 2021-02-02 15:10:56 PST
Committed r272240: <https://trac.webkit.org/changeset/272240> All reviewed patches have been landed. Closing bug and clearing flags on attachment 419044 [details].
Radar WebKit Bug Importer
Comment 3 2021-02-02 15:11:14 PST
Note You need to log in before you can comment on or make changes to this bug.