mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 20:14:49 +00:00
fuckit: no patch db locks (#1969)
* fuck it: no patchdb locks * fix: Add the locking to the package during the backup. (#1979) * fix: Add the locking to the package during the backup. * fix: Lock for the uninstall of the package * switch patch-db to next Co-authored-by: J M <2364004+Blu-J@users.noreply.github.com>
This commit is contained in:
@@ -47,11 +47,7 @@ impl VersionT for Version {
|
||||
crate::hostname::ensure_hostname_is_set(db, &receipts).await?;
|
||||
receipts.id.set(db, generate_id()).await?;
|
||||
|
||||
let mut ui = crate::db::DatabaseModel::new()
|
||||
.ui()
|
||||
.get(db, false)
|
||||
.await?
|
||||
.clone();
|
||||
let mut ui = crate::db::DatabaseModel::new().ui().get(db).await?.clone();
|
||||
ui.merge_with(&DEFAULT_UI);
|
||||
crate::db::DatabaseModel::new().ui().put(db, &ui).await?;
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ impl VersionT for Version {
|
||||
|
||||
for package_id in crate::db::DatabaseModel::new()
|
||||
.package_data()
|
||||
.keys(db, false)
|
||||
.keys(db)
|
||||
.await?
|
||||
.iter()
|
||||
{
|
||||
@@ -126,7 +126,7 @@ impl VersionT for Version {
|
||||
ui["auto-check-updates"] = Value::Bool(true);
|
||||
ui["pkg-order"] = json!(crate::db::DatabaseModel::new()
|
||||
.package_data()
|
||||
.keys(db, false)
|
||||
.keys(db)
|
||||
.await?
|
||||
.iter()
|
||||
.map(|x| x.to_string())
|
||||
|
||||
Reference in New Issue
Block a user