Skip to content

Commit

Permalink
fix product key reading and fix ruby dbus crash
Browse files Browse the repository at this point in the history
  • Loading branch information
jreidinger committed Dec 6, 2023
1 parent 7c170a8 commit 8b59f23
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion rust/agama-lib/src/product/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use serde::{Deserialize, Serialize};
#[serde(rename_all = "camelCase")]
pub struct ProductSettings {
/// ID of the product to install (e.g., "ALP", "Tumbleweed", etc.)
pub product: Option<String>,
pub id: Option<String>,
pub registration_code: Option<String>,
pub email: Option<String>
}
4 changes: 2 additions & 2 deletions rust/agama-lib/src/product/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ impl<'a> ProductStore<'a> {
let email = self.product_client.email().await?;

Ok(ProductSettings {
product: Some(product),
id: Some(product),
registration_code: Some(registration_code),
email: Some(email)
})
}

pub async fn store(&self, settings: &ProductSettings) -> Result<(), ServiceError> {
let mut probe = false;
if let Some(product) = &settings.product {
if let Some(product) = &settings.id {
self.product_client.select_product(product).await?;
probe = true;
}
Expand Down
2 changes: 1 addition & 1 deletion service/lib/agama/software/manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ def user_patterns=(ids)
user_patterns.each { |p| Yast::Pkg.ResolvableNeutral(p, :pattern, force = false) }
Yast::PackagesProposal.SetResolvables(PROPOSAL_ID, :pattern, ids)
ids.each { |p| Yast::Pkg.ResolvableInstall(p, :pattern) }
logger.info "Setting patterns to #{res.inspect}"
logger.info "Setting patterns to #{ids.inspect}"

res = Yast::Pkg.PkgSolve(unused = true)
logger.info "Solver run #{res.inspect}"
Expand Down

0 comments on commit 8b59f23

Please sign in to comment.