Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions rust/agama-lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ tokio-tungstenite = { version = "0.26.2", features = ["native-tls"] }
tokio-native-tls = "0.3.1"
percent-encoding = "2.3.1"
uuid = { version = "1.17.0", features = ["serde", "v4"] }
zypp-agama = { path = "../zypp-agama" }

[dev-dependencies]
httpmock = "0.7.0"
Expand Down
3 changes: 2 additions & 1 deletion rust/agama-lib/src/logs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ use std::path::{Path, PathBuf};
use std::process::Command;
use tempfile::TempDir;
use utoipa::ToSchema;
use zypp_agama::SOLVER_TESTCASE_DIR;

const DEFAULT_COMMANDS: [(&str, &str); 2] = [
// (<command to be executed>, <file name used for storing result of the command>)
Expand All @@ -50,7 +51,7 @@ const DEFAULT_PATHS: [&str; 18] = [
"/var/log/boot.msg",
"/var/log/udev.log",
"/var/log/zypp/history",
"/var/log/zypp/testcase",
SOLVER_TESTCASE_DIR,
"/run/agama/dbus.log",
"/run/agama/inst-scripts",
// config
Expand Down
9 changes: 9 additions & 0 deletions rust/package/agama.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
-------------------------------------------------------------------
Mon Mar 9 11:37:06 UTC 2026 - Ladislav Slezák <lslezak@suse.com>

- Move the location of the dumped solver testcase
to /run/agama/testcase, do not save solver testcase when
"ZYPP_FULLLOG=1" (in that case libzypp creates the solver
testcase automatically in the /var/log/YaST2/autoTestcase/
directory) (related to gh#agama-project/agama#3242)

-------------------------------------------------------------------
Mon Mar 9 09:39:13 UTC 2026 - Stefan Hundhammer <shundhammer@suse.com>

Expand Down
9 changes: 6 additions & 3 deletions rust/zypp-agama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use helpers::{status_to_result, status_to_result_void, string_from_ptr};
pub mod callbacks;

// directory where the solver testcase is saved
const SOLVER_TESTCASE_DIR: &str = "/var/log/zypp/testcase";
pub const SOLVER_TESTCASE_DIR: &str = "/run/agama/testcase";

#[derive(Debug)]
pub struct Repository {
Expand Down Expand Up @@ -594,8 +594,11 @@ impl Zypp {
let status_ptr = &mut status as *mut _;
let r_res = zypp_agama_sys::run_solver(self.ptr, only_required, status_ptr);

// save the solver test case if the solver run failed or if saving is forced via boot parameter
if !r_res || save_testcase {
// save the solver testcase if the solver run failed or if saving is forced via boot
// parameter, skip when "ZYPP_FULLLOG=1", in that case libzypp creates the solver
// testcase automatically in the /var/log/YaST2/autoTestcase/ directory
if (!r_res || save_testcase) && std::env::var("ZYPP_FULLLOG").unwrap_or_default() != "1"
{
self.create_solver_testcase();
} else {
// delete the solver testcase directory, it contains the previous error which is
Expand Down
Loading