mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 12:11:56 +00:00
appmgr: initialize dependency errors on install
This commit is contained in:
committed by
Aiden McClelland
parent
8954e3e338
commit
8fba85277a
@@ -354,12 +354,25 @@ pub async fn install_s9pk<R: AsyncRead + AsyncSeek + Unpin>(
|
||||
log::info!("Install {}@{}: Complete", pkg_id, version);
|
||||
|
||||
let static_files = StaticFiles::local(pkg_id, version, manifest.assets.icon_type())?;
|
||||
let current_dependencies = manifest
|
||||
.dependencies
|
||||
.0
|
||||
.iter()
|
||||
.filter_map(|(id, info)| {
|
||||
if info.optional.is_none() {
|
||||
Some((id.clone(), CurrentDependencyInfo::default()))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
})
|
||||
.collect();
|
||||
let installed = InstalledPackageDataEntry {
|
||||
manifest: manifest.clone(),
|
||||
status: Status {
|
||||
configured: manifest.config.is_none(),
|
||||
main: MainStatus::Stopped,
|
||||
dependency_errors: todo!(),
|
||||
dependency_errors: DependencyErrors::init(&mut tx, &manifest, ¤t_dependencies)
|
||||
.await?,
|
||||
},
|
||||
system_pointers: Vec::new(),
|
||||
current_dependents: {
|
||||
@@ -386,18 +399,7 @@ pub async fn install_s9pk<R: AsyncRead + AsyncSeek + Unpin>(
|
||||
}
|
||||
deps
|
||||
},
|
||||
current_dependencies: manifest
|
||||
.dependencies
|
||||
.0
|
||||
.iter()
|
||||
.filter_map(|(id, info)| {
|
||||
if info.optional.is_none() {
|
||||
Some((id.clone(), CurrentDependencyInfo::default()))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
})
|
||||
.collect(),
|
||||
current_dependencies,
|
||||
interface_info,
|
||||
};
|
||||
let mut pde = model.get_mut(&mut tx).await?;
|
||||
|
||||
Reference in New Issue
Block a user