Skip to content

Commit

Permalink
handle current-dependents properly during update (#1621)
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-bonez committed Jul 6, 2022
1 parent 17ef97c commit b0a5559
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions backend/src/install/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1360,21 +1360,22 @@ pub async fn install_s9pk<R: AsyncRead + AsyncSeek + Unpin>(
.await?;
*main_status = prev.status.main;
main_status.save(&mut tx).await?;
} else {
remove_from_current_dependents_lists(
&mut tx,
pkg_id,
&prev.current_dependencies,
&receipts.config.current_dependents,
)
.await?; // remove previous
add_dependent_to_current_dependents_lists(
&mut tx,
pkg_id,
&current_dependencies,
&receipts.config.current_dependents,
)
.await?; // add new
}
remove_from_current_dependents_lists(
&mut tx,
pkg_id,
&prev.current_dependencies,
&receipts.config.current_dependents,
)
.await?; // remove previous
add_dependent_to_current_dependents_lists(
&mut tx,
pkg_id,
&current_dependencies,
&receipts.config.current_dependents,
)
.await?; // add new
update_dependency_errors_of_dependents(
ctx,
&mut tx,
Expand Down

0 comments on commit b0a5559

Please sign in to comment.