mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-01 21:13:09 +00:00
fix warnings
This commit is contained in:
committed by
Aiden McClelland
parent
824bccda0e
commit
5d44519d0d
@@ -1,19 +1,13 @@
|
||||
use std::borrow::Cow;
|
||||
use std::collections::HashMap;
|
||||
use std::path::Path;
|
||||
|
||||
use anyhow::anyhow;
|
||||
use bollard::image::ListImagesOptions;
|
||||
use bollard::Docker;
|
||||
use patch_db::{DbHandle, PatchDbHandle};
|
||||
use tokio::process::Command;
|
||||
|
||||
use super::PKG_PUBLIC_DIR;
|
||||
use crate::context::RpcContext;
|
||||
use crate::db::model::{InstalledPackageDataEntry, PackageDataEntry};
|
||||
use crate::dependencies::DependencyError;
|
||||
use crate::s9pk::manifest::{Manifest, PackageId};
|
||||
use crate::util::{Invoke, Version};
|
||||
use crate::s9pk::manifest::PackageId;
|
||||
use crate::util::Version;
|
||||
use crate::Error;
|
||||
|
||||
pub async fn update_dependents<'a, Db: DbHandle, I: IntoIterator<Item = &'a PackageId>>(
|
||||
@@ -171,21 +165,3 @@ pub async fn uninstall(
|
||||
tx.commit(None).await?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn test() {
|
||||
dbg!(
|
||||
Docker::connect_with_socket_defaults()
|
||||
.unwrap()
|
||||
.list_images(Some(ListImagesOptions {
|
||||
all: false,
|
||||
filters: {
|
||||
let mut f = HashMap::new();
|
||||
f.insert("reference", vec!["start9/*:latest"]);
|
||||
f
|
||||
},
|
||||
digests: false
|
||||
}))
|
||||
.await
|
||||
);
|
||||
}
|
||||
|
||||
@@ -2,29 +2,20 @@ use std::collections::HashSet;
|
||||
use std::fmt::Display;
|
||||
use std::io::SeekFrom;
|
||||
use std::path::Path;
|
||||
use std::pin::Pin;
|
||||
use std::process::Stdio;
|
||||
use std::sync::atomic::{AtomicBool, AtomicU64, Ordering};
|
||||
use std::sync::atomic::Ordering;
|
||||
use std::sync::Arc;
|
||||
use std::task::{Context, Poll};
|
||||
use std::time::Duration;
|
||||
|
||||
use anyhow::anyhow;
|
||||
use emver::VersionRange;
|
||||
use futures::TryStreamExt;
|
||||
use http::{HeaderMap, StatusCode};
|
||||
use indexmap::{IndexMap, IndexSet};
|
||||
use patch_db::json_ptr::JsonPointer;
|
||||
use patch_db::{
|
||||
DbHandle, HasModel, MapModel, Model, ModelData, OptionModel, PatchDbHandle, Revision,
|
||||
};
|
||||
use indexmap::IndexMap;
|
||||
use patch_db::{DbHandle, OptionModel};
|
||||
use reqwest::Response;
|
||||
use rpc_toolkit::command;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_json::Value;
|
||||
use sha2::{Digest, Sha256};
|
||||
use tokio::fs::{File, OpenOptions};
|
||||
use tokio::io::{AsyncRead, AsyncSeek, AsyncSeekExt, AsyncWrite, AsyncWriteExt};
|
||||
use tokio::io::{AsyncRead, AsyncSeek, AsyncSeekExt, AsyncWriteExt};
|
||||
|
||||
use self::cleanup::cleanup_failed;
|
||||
use crate::context::RpcContext;
|
||||
@@ -74,7 +65,7 @@ pub async fn install(
|
||||
let man: Manifest = man_res.json().await.with_kind(crate::ErrorKind::Registry)?;
|
||||
|
||||
let progress = InstallProgress::new(s9pk.content_length());
|
||||
let static_files = StaticFiles::remote(&man.id, &man.version, man.assets.icon_type());
|
||||
let static_files = StaticFiles::remote(&man.id, &man.version);
|
||||
let mut db_handle = ctx.db.handle();
|
||||
let mut tx = db_handle.begin().await?;
|
||||
let mut pde = crate::db::DatabaseModel::new()
|
||||
|
||||
@@ -6,11 +6,10 @@ use std::sync::Arc;
|
||||
use std::task::{Context, Poll};
|
||||
use std::time::Duration;
|
||||
|
||||
use patch_db::{DbHandle, HasModel, OptionModel, PatchDb, PatchDbHandle};
|
||||
use patch_db::{DbHandle, HasModel, OptionModel, PatchDb};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use tokio::io::{AsyncRead, AsyncSeek, AsyncWrite};
|
||||
|
||||
use crate::db::model::PackageDataEntry;
|
||||
use crate::Error;
|
||||
|
||||
#[derive(Debug, Deserialize, Serialize, HasModel)]
|
||||
|
||||
Reference in New Issue
Block a user