Skip to content

Commit 7a34d0d

Browse files
authored
Hw enablement flag (#3263)
## Problem Hardware specific packages are not auto selected. bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=1258193 ## Solution Add recommended solver flag.
2 parents 43d5ba3 + 32de6a7 commit 7a34d0d

File tree

3 files changed

+23
-6
lines changed

3 files changed

+23
-6
lines changed

rust/package/agama.changes

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
-------------------------------------------------------------------
2+
Tue Mar 10 09:59:45 UTC 2026 - Josef Reidinger <jreidinger@suse.com>
3+
4+
- Always add hardware/filesystem/locale proposed packages when
5+
running solver (bsc#1258193)
6+
17
-------------------------------------------------------------------
28
Mon Mar 9 11:37:06 UTC 2026 - Ladislav Slezák <lslezak@suse.com>
39

rust/zypp-agama/zypp-agama-sys/c-layer/include/lib.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,9 @@ void free_patterns(const struct Patterns *patterns) noexcept;
180180
/// Representation of zypp::Product
181181
struct Product {
182182
// so far we do not need more details about the products
183-
const char *name; ///< owned
184-
const char *repo_alias; ///< owned
185-
const char *service_alias; ///< owned
183+
const char *name; ///< owned
184+
const char *repo_alias; ///< owned
185+
const char *service_alias; ///< owned
186186
};
187187

188188
struct Products {
@@ -231,7 +231,8 @@ bool is_package_selected(struct Zypp *zypp, const char *tag,
231231
bool run_solver(struct Zypp *zypp, bool only_required,
232232
struct Status *status) noexcept;
233233

234-
/// Create a solver testcase, dumps all all solver data (repositories, loaded packages...) to disk
234+
/// Create a solver testcase, dumps all all solver data (repositories, loaded
235+
/// packages...) to disk
235236
/// @param zypp see \ref init_target
236237
/// @param dir directory path where the solver testcase is saved
237238
/// @return true if the solver testcase was successfully created

rust/zypp-agama/zypp-agama-sys/c-layer/lib.cxx

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -461,8 +461,18 @@ bool run_solver(struct Zypp *zypp, bool only_required,
461461
struct Status *status) noexcept {
462462
try {
463463
STATUS_OK(status);
464-
zypp->zypp_pointer->resolver()->setOnlyRequires(only_required);
465-
return zypp->zypp_pointer->resolver()->resolvePool();
464+
auto resolver = zypp->zypp_pointer->resolver();
465+
resolver->setOnlyRequires(only_required);
466+
// needed to get hardware and locale specific provisioning
467+
// @ma: On a fresh install I'd recommend to set INR if you
468+
// want HW/Filesystem/Language supporting packages to be selected.
469+
// INR is the mode e.g. 'zypper inr' operates in, AKA InstallNewRecommends.
470+
// Recommendations of already installed packages are usually not evaluated
471+
// again. With INR they are.
472+
// The Resolver flag is setIgnoreAlreadyRecommended=0.
473+
// (addalreadyrecommended=1 is libsolv world)
474+
resolver->setIgnoreAlreadyRecommended(false);
475+
return resolver->resolvePool();
466476
} catch (zypp::Exception &excpt) {
467477
STATUS_EXCEPT(status, excpt);
468478
return false; // do not matter much as status indicate failure

0 commit comments

Comments
 (0)