v2 migration

This commit is contained in:
Aiden McClelland
2021-10-07 16:33:51 -06:00
committed by Aiden McClelland
parent 7fc4cb175c
commit e58df7ec4a
22 changed files with 466 additions and 81 deletions

View File

@@ -6,7 +6,6 @@ use patch_db::{DbHandle, PatchDbHandle};
use super::PKG_DOCKER_DIR;
use crate::context::RpcContext;
use crate::db::model::{CurrentDependencyInfo, InstalledPackageDataEntry, PackageDataEntry};
use crate::dependencies::update_current_dependents;
use crate::s9pk::manifest::PackageId;
use crate::util::Version;
use crate::Error;
@@ -218,6 +217,12 @@ pub async fn uninstall(
entry.current_dependents.keys(),
)
.await?;
tokio::fs::remove_dir_all(
ctx.datadir
.join(crate::volume::PKG_VOLUME_DIR)
.join(&entry.manifest.id),
)
.await?;
tx.commit(None).await?;
Ok(())
}