Skip to content

Commit

Permalink
[webkitcorepy] Autoinstaller unsafe with multiple processes
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=244868
<rdar://99574043>

Reviewed by Alexey Proskuryakov.

* Tools/Scripts/libraries/webkitcorepy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitcorepy/webkitcorepy/autoinstall.py:
(Package.install): Include PID in temp directory name.

Canonical link: https://commits.webkit.org/254210@main
  • Loading branch information
JonWBedard committed Sep 7, 2022
1 parent 5f8a81b commit e310ded
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Tools/Scripts/libraries/webkitcorepy/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def readme():

setup(
name='webkitcorepy',
version='0.13.11',
version='0.13.12',
description='Library containing various Python support classes and functions.',
long_description=readme(),
classifiers=[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
from webkitcorepy.editor import Editor
from webkitcorepy.file_lock import FileLock

version = Version(0, 13, 11)
version = Version(0, 13, 12)

from webkitcorepy.autoinstall import Package, AutoInstall
if sys.version_info > (3, 0):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2020 Apple Inc. All rights reserved.
# Copyright (C) 2020-2022 Apple Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -292,7 +292,7 @@ def install(self):
AutoInstall.log('Downloading {}...'.format(archive))
archive.download()

temp_location = os.path.join(tempfile.gettempdir(), self.name)
temp_location = os.path.join(tempfile.gettempdir(), '{}-{}'.format(self.name, os.getpid()))
archive.unpack(temp_location)

for candidate in os.listdir(temp_location):
Expand Down

0 comments on commit e310ded

Please sign in to comment.