mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-02 05:23:14 +00:00
Feature/registry package index (#2623)
* include system images in compat s9pk * wip * wip * update types * wip * fix signature serialization * Add SignatureHeader conversions * finish display impl for get --------- Co-authored-by: Shadowy Super Coder <musashidisciple@proton.me>
This commit is contained in:
@@ -22,7 +22,7 @@ use crate::install::PKG_ARCHIVE_DIR;
|
||||
use crate::lxc::ContainerId;
|
||||
use crate::prelude::*;
|
||||
use crate::progress::{NamedProgress, Progress};
|
||||
use crate::rpc_continuations::RequestGuid;
|
||||
use crate::rpc_continuations::Guid;
|
||||
use crate::s9pk::S9pk;
|
||||
use crate::service::service_map::InstallProgressHandles;
|
||||
use crate::service::transition::TransitionKind;
|
||||
@@ -254,7 +254,7 @@ impl Service {
|
||||
pub async fn install(
|
||||
ctx: RpcContext,
|
||||
s9pk: S9pk,
|
||||
src_version: Option<models::Version>,
|
||||
src_version: Option<models::VersionString>,
|
||||
progress: Option<InstallProgressHandles>,
|
||||
) -> Result<Self, Error> {
|
||||
let manifest = s9pk.as_manifest().clone();
|
||||
@@ -339,7 +339,7 @@ impl Service {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub async fn uninstall(self, target_version: Option<models::Version>) -> Result<(), Error> {
|
||||
pub async fn uninstall(self, target_version: Option<models::VersionString>) -> Result<(), Error> {
|
||||
self.seed
|
||||
.persistent_container
|
||||
.execute(ProcedureName::Uninit, to_value(&target_version)?, None) // TODO timeout
|
||||
@@ -513,7 +513,7 @@ pub struct ConnectParams {
|
||||
pub async fn connect_rpc(
|
||||
ctx: RpcContext,
|
||||
ConnectParams { id }: ConnectParams,
|
||||
) -> Result<RequestGuid, Error> {
|
||||
) -> Result<Guid, Error> {
|
||||
let id_ref = &id;
|
||||
crate::lxc::connect(
|
||||
&ctx,
|
||||
|
||||
@@ -1336,12 +1336,15 @@ async fn set_dependencies(
|
||||
};
|
||||
let (icon, title) = match async {
|
||||
let remote_s9pk = S9pk::deserialize(
|
||||
&HttpSource::new(
|
||||
ctx.ctx.client.clone(),
|
||||
registry_url
|
||||
.join(&format!("package/v2/{}.s9pk?spec={}", dep_id, version_spec))?,
|
||||
)
|
||||
.await?,
|
||||
&Arc::new(
|
||||
HttpSource::new(
|
||||
ctx.ctx.client.clone(),
|
||||
registry_url
|
||||
.join(&format!("package/v2/{}.s9pk?spec={}", dep_id, version_spec))?,
|
||||
)
|
||||
.await?,
|
||||
),
|
||||
None, // TODO
|
||||
true,
|
||||
)
|
||||
.await?;
|
||||
|
||||
@@ -89,7 +89,7 @@ impl ServiceMap {
|
||||
}
|
||||
|
||||
#[instrument(skip_all)]
|
||||
pub async fn install<S: FileSource>(
|
||||
pub async fn install<S: FileSource + Clone>(
|
||||
&self,
|
||||
ctx: RpcContext,
|
||||
mut s9pk: S9pk<S>,
|
||||
|
||||
Reference in New Issue
Block a user