Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions src/backend/conda.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ impl CondaBackend {
}

file::create_dir_all(Self::conda_data_dir())?;
let temp = dest.with_extension("tmp");
let temp = dest.with_extension(format!("tmp.{}", std::process::id()));
HTTP.download_file(url, &temp, None).await?;

if !Self::verify_checksum(&temp, checksum)? {
Expand Down Expand Up @@ -354,7 +354,7 @@ impl CondaBackend {
async fn install_from_locked(
&self,
ctx: &InstallContext,
tv: &ToolVersion,
tv: &mut ToolVersion,
platform_key: &str,
) -> Result<()> {
ctx.pr.set_message("using locked dependencies".to_string());
Expand Down Expand Up @@ -408,6 +408,16 @@ impl CondaBackend {

Self::make_bins_executable(&install_path)?;

// Repopulate tv.conda_packages from lockfile so downstream lockfile update preserves entries
for basename in &dep_basenames {
if let Some(pkg_info) = lockfile.get_conda_package(platform_key, basename) {
tv.conda_packages.insert(
(platform_key.to_string(), basename.clone()),
pkg_info.clone(),
);
}
}

Ok(())
}

Expand Down Expand Up @@ -536,7 +546,8 @@ impl Backend for CondaBackend {
.is_some();

if has_locked {
self.install_from_locked(ctx, &tv, &platform_key).await?;
self.install_from_locked(ctx, &mut tv, &platform_key)
.await?;
} else {
self.install_fresh(ctx, &mut tv, &platform_key).await?;
}
Expand Down
Loading