New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
local ports: use cache lock (#9342) #9391
Conversation
tools/system_libs.py
Outdated
shared.try_delete(fullname) | ||
shutil.copytree(path, os.path.join(fullname, subdir)) | ||
Ports.clear_project_build(name) | ||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you leave the return statement outside (after) the try/finally.. it makes the early return pattern more clear.
Also, the the first two lines of the try block and stay outside too I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done :)
logger.warning('grabbing local port: ' + name + ' from ' + path + ' to ' + fullname + ' (subdir: ' + subdir + ')') | ||
shared.try_delete(fullname) | ||
shutil.copytree(path, os.path.join(fullname, subdir)) | ||
Ports.clear_project_build(name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Presumably its these three lines that require the lock?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The SDL2 port deletes depending ports prior (re)building, so I'm afraid that locking only those lines will lead to build failures like SDL2 (process1) > SDL2_image (p1) > SDL2 (process2) > missing SDL2_image.
That's basically why I didn't try to be specific about the lock.
I cannot confirm right now due to #9402.
EDIT: clarified my failure scenario, needs some testing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems reasonable to me. Basically, any local-ports work should be locked.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm % comments
Something weird happened with the tests here, but this should be safe to merge... |
Cf. #9342