mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 20:14:49 +00:00
keep status if package has no config (#1626)
This commit is contained in:
@@ -1381,20 +1381,6 @@ pub async fn install_s9pk<R: AsyncRead + AsyncSeek + Unpin>(
|
|||||||
&receipts.config,
|
&receipts.config,
|
||||||
)
|
)
|
||||||
.await?;
|
.await?;
|
||||||
let mut main_status = crate::db::DatabaseModel::new()
|
|
||||||
.package_data()
|
|
||||||
.idx_model(pkg_id)
|
|
||||||
.expect(&mut tx)
|
|
||||||
.await?
|
|
||||||
.installed()
|
|
||||||
.expect(&mut tx)
|
|
||||||
.await?
|
|
||||||
.status()
|
|
||||||
.main()
|
|
||||||
.get_mut(&mut tx)
|
|
||||||
.await?;
|
|
||||||
*main_status = prev.status.main;
|
|
||||||
main_status.save(&mut tx).await?;
|
|
||||||
} else {
|
} else {
|
||||||
remove_from_current_dependents_lists(
|
remove_from_current_dependents_lists(
|
||||||
&mut tx,
|
&mut tx,
|
||||||
@@ -1411,6 +1397,22 @@ pub async fn install_s9pk<R: AsyncRead + AsyncSeek + Unpin>(
|
|||||||
)
|
)
|
||||||
.await?; // add new
|
.await?; // add new
|
||||||
}
|
}
|
||||||
|
if configured || manifest.config.is_none() {
|
||||||
|
let mut main_status = crate::db::DatabaseModel::new()
|
||||||
|
.package_data()
|
||||||
|
.idx_model(pkg_id)
|
||||||
|
.expect(&mut tx)
|
||||||
|
.await?
|
||||||
|
.installed()
|
||||||
|
.expect(&mut tx)
|
||||||
|
.await?
|
||||||
|
.status()
|
||||||
|
.main()
|
||||||
|
.get_mut(&mut tx)
|
||||||
|
.await?;
|
||||||
|
*main_status = prev.status.main;
|
||||||
|
main_status.save(&mut tx).await?;
|
||||||
|
}
|
||||||
update_dependency_errors_of_dependents(
|
update_dependency_errors_of_dependents(
|
||||||
ctx,
|
ctx,
|
||||||
&mut tx,
|
&mut tx,
|
||||||
|
|||||||
Reference in New Issue
Block a user