Bobby Bruce has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/58489 )
Change subject: stdlib: Fixing resources.json caching for multi-user envs
......................................................................
stdlib: Fixing resources.json caching for multi-user envs
The downloader briefly caches the resources.json file in "/tmp". This
works fine if the system only has one user, but in a system supporting
many users, where "/tmp" is shared, there were permission issues when a
user tried to access a resources.json cache from another user. To
resolve this the uid of the user is appended to the filename.
Change-Id: Iba8ab12cd7054c2f5636e444ac0f1f8f73fedc89
---
M src/python/gem5/resources/downloader.py
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/python/gem5/resources/downloader.py
b/src/python/gem5/resources/downloader.py
index 828ebc8..e18c31c 100644
--- a/src/python/gem5/resources/downloader.py
+++ b/src/python/gem5/resources/downloader.py
@@ -80,7 +80,8 @@
file_path = os.path.join(
gettempdir(),
- f"gem5-resources-{hashlib.md5(url.encode()).hexdigest()}.base64",
+ f"gem5-resources-{hashlib.md5(url.encode()).hexdigest()}"
+ f"-{str(os.getuid())}.base64",
)
# We apply a lock on the resources file for when it's downloaded, or
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/58489
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Iba8ab12cd7054c2f5636e444ac0f1f8f73fedc89
Gerrit-Change-Number: 58489
Gerrit-PatchSet: 1
Gerrit-Owner: Bobby Bruce <bbr...@ucdavis.edu>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s