Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F7122825
D6010.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
D6010.diff
View Options
diff --git a/swh/lister/opam/lister.py b/swh/lister/opam/lister.py
--- a/swh/lister/opam/lister.py
+++ b/swh/lister/opam/lister.py
@@ -51,9 +51,19 @@
scheduler=scheduler, credentials=credentials, url=url, instance=instance,
)
self.env = os.environ.copy()
- self.env["OPAMROOT"] = tempfile.mkdtemp(prefix="swh_opam_lister")
+ self.opamroot = tempfile.mkdtemp(prefix="swh_opam_lister")
call(
- ["opam", "init", "--reinit", "--bare", "--no-setup", instance, url],
+ [
+ "opam",
+ "init",
+ "--reinit",
+ "--bare",
+ "--no-setup",
+ "--root",
+ self.opamroot,
+ instance,
+ url,
+ ],
env=self.env,
)
@@ -66,6 +76,8 @@
"--no-switch",
"--repos",
self.instance,
+ "--root",
+ self.opamroot,
"--normalise",
"--short",
],
@@ -87,7 +99,7 @@
url=url,
last_update=None,
extra_loader_arguments={
- "opam_root": self.env["OPAMROOT"],
+ "opam_root": self.opamroot,
"opam_instance": self.instance,
"opam_url": self.url,
"opam_package": page,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Dec 17, 4:42 AM (2 w, 1 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3219978
Attached To
D6010: opam: Directly use the --root flag instead of using an env variable
Event Timeline
Log In to Comment