1
0
mirror of https://github.com/openSUSE/libsolv.git synced 2026-02-05 12:45:46 +01:00

3748 Commits

Author SHA1 Message Date
Fabrice Fontaine
5691f58d1f Fix build without C++
Fix the following build failure without C++:

CMake Error at CMakeLists.txt:1 (PROJECT):
  No CMAKE_CXX_COMPILER could be found.

  Tell CMake where to find the compiler by setting either the environment
  variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
  to the compiler, or to the compiler name if it is in the PATH.

Fixes:
 - http://autobuild.buildroot.org/results/a7f2176d40f156c319754ef5d3b7fd0decfe754f

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2023-02-12 15:27:27 +01:00
Michael Schroeder
ec0123c4fe Document BPOOL_FLAG_NOWHATPROVIDESAUX and POOL_FLAG_WHATPROVIDESWITHDISABLED
At least in libsolv-bindings...
2023-01-31 12:52:49 +01:00
Michael Schroeder
8c7072d4ff Use SOLVER_DECISIONLIST_SORTED in showwhy() 2023-01-13 11:46:40 +01:00
Michael Schroeder
2370bb491b Implement decision sorting for package decisionlists
We only sort blocks of unit rule decisions for now.
2023-01-13 11:44:53 +01:00
Michael Schroeder
b43c0583d6 Support x86_64_v[234] architecture levels 2023-01-09 12:34:34 +01:00
Michael Schroeder
c45526288a Use pool instread of solv->pool where we can 2022-12-22 10:34:12 +01:00
Michael Schroeder
86c54ea5c7 Use solver_problem2str() convenience function in the demo solver 2022-12-21 14:18:16 +01:00
Michael Schroeder
685a7c850a Move replace solution types from the bindings to the library
This adds two new functions:

solver_all_solutionelements()
return a queue with (type,p,rp) solution triplets.

solver_solutionelementtype2str()
this is similar to solver_solutionelement2str(), but also takes a
type parameter so that the replace types result in different strings.

Make use of the two functions in the example solver to
show how they work.
2022-12-21 14:06:16 +01:00
Michael Schroeder
a030365d79 Fix typo in comment 2022-12-21 14:06:15 +01:00
Michael Schroeder
2f60e1253b Split is_obsoleting() from policy_findupdatepackages
This makes the code a bit more readable. Plus, we can reuse
this function in the future.
2022-12-21 14:06:15 +01:00
Michael Schroeder
779673739c Merge pull request #516 from hroncok/no_distutils
Python: Remove usage of the deprecated distutils module
2022-12-20 10:51:15 +01:00
Miro Hrončok
1befb9c4ad Python: Remove usage of the deprecated distutils module
Python 3.12+ no longer has distutils.

See https://peps.python.org/pep-0632/
2022-12-19 23:07:57 +01:00
Michael Schroeder
4717e0bcf7 Fix pool_whatmatchesdep's SOLVABLE_NAME hack 2022-12-19 15:51:41 +01:00
Michael Schroeder
b460ac4fb1 Speed up obsoletes handling in update rule generation a bit 2022-12-19 14:51:10 +01:00
Michael Schroeder
bd26a4873a Add testcase for yumobs pruning 2022-12-19 14:49:46 +01:00
Michael Schroeder
b3b51be758 Improve pruning of yumobs branches 2022-12-16 11:01:48 +01:00
Michael Schroeder
7fef0e3900 Add alternative/yumobs.t testcase 2022-12-15 11:51:14 +01:00
Michael Schroeder
a6b622c05b Do not report alternatives for yumobs splits 2022-12-15 11:50:04 +01:00
Michael Schroeder
e31dfa02ed Move alternatives introspection code into decision.c 2022-12-15 11:02:40 +01:00
Michael Schroeder
73d072b09d Add release to obsoletes in the alternative/update.t test
Otherwise it fails on debian.
2022-12-15 11:00:47 +01:00
Michael Schroeder
577633c245 Require rpm dependencies in alternative/learnt
The pool_dep2str() output depends on the disttype
2022-12-15 10:26:27 +01:00
Michael Schroeder
8ae7e91872 Add testcases for the alternative introspection 2022-12-14 17:02:02 +01:00
Michael Schroeder
14a57e5be4 Adapt testcases to the last change 2022-12-14 17:01:23 +01:00
Michael Schroeder
be85fd99b2 Make use of solver_alternative2str() in testcases
The downside is that only the first ruleinfo is displayed. We'll
see if we need solver_allalternativeinfos...
2022-12-14 16:58:28 +01:00
Michael Schroeder
109a45e9f4 Handle learnt rules in solver_alternativeinfo() 2022-12-14 16:57:38 +01:00
Michael Schroeder
c6c3088ddb Swap from/to in the ruleinfo instead of just overwriting
Otherwise we report a wrong providing package.
2022-12-14 16:56:40 +01:00
Michael Schroeder
6f197aad22 Update checksum types in bindings documentation 2022-12-13 14:07:41 +01:00
Michael Schroeder
6deaca7cf6 Add changes, bump version to 0.7.23 0.7.23 2022-12-13 11:52:50 +01:00
Michael Schroeder
3967bf1abd solv: Do not print duchanges if there is no change 2022-12-13 11:22:29 +01:00
Michael Schroeder
73415322c1 Add a DISABLE_UPDATE entry if we need to disable a best rules 2022-12-13 11:19:02 +01:00
Michael Schroeder
a615b2f97b Add solver_alternativeinfo() function
This code is split off from the solver_alternative2str() function
so that library users can offer translated messages.
2022-12-13 10:45:55 +01:00
Michael Schroeder
613c7a6017 Make get_decision also return a decision for unrelated solvables
Consistency with get_decisionlist().
2022-12-13 10:01:35 +01:00
Michael Schroeder
0af2e55891 Add documentation for solver.get_decision()
And no longer document the obsolete describe_decision method.
2022-12-13 09:59:58 +01:00
Michael Schroeder
8ad1ab1b34 Improve solver_alternative2str
Add code for SOLVER_RULE_BEST and SOLVER_RULE_PKG_RECOMMENDS.
2022-12-12 16:21:29 +01:00
Michael Schroeder
103f54b5f8 Add alternative reporting
Also make pysolv work again with newer rpm versions. We need
to rewind the file descriptor int the RPMCALLBACK_INST_OPEN_FILE
callback as rpm now opens the file twice.
2022-12-12 16:18:43 +01:00
Michael Schroeder
d276840b58 Document pool.solvableset2str and pool.solvidset2str 2022-12-12 15:55:20 +01:00
Michael Schroeder
cdf3f67b03 Document the Alternative, Decision, Decisionset classes 2022-12-12 15:44:54 +01:00
Michael Schroeder
4c57f5dc57 Rename solver.all_alternatives to solver.alternatives
Make it consistent with problem.solutions()
2022-12-12 15:41:52 +01:00
Michael Schroeder
cd797f7144 Tweak decision bindings to make them more consistent
Make rule/solvable attributes. Rename decisionset.packages()
to decisionset.solvables(). Add decisionset.Dep attribute.

Also add missing SOLVER_RULE constants.
2022-12-12 15:19:36 +01:00
Michael Schroeder
25c5ca6034 Make use of the new solver_decisionlist_merged() function
It's faster and simpler than the old way.
2022-12-12 10:06:07 +01:00
Michael Schroeder
e4acd4a875 Add a solver_decisionlist_merged() function
This returns the number of merged decisions for a decisionlist
entry, i.e. the number of decisions minus one.
2022-12-12 10:03:30 +01:00
Michael Schroeder
de7d86731e bindings: add decisionlistset.decisions() to get the merged decisions 2022-12-09 15:34:41 +01:00
Michael Schroeder
3cf0ec93aa Small code refactoring, no functional changes 2022-12-08 13:37:00 +01:00
Michael Schroeder
5343868f14 Small code cleanup, no functional changes 2022-12-08 11:54:08 +01:00
Michael Schroeder
a72dd720a0 Add proof reporting to the 'solv' example tool 2022-12-08 11:53:12 +01:00
Michael Schroeder
813cb39f38 Add -Wno-missing-braces when compiling tcl bindings 2022-12-08 11:51:56 +01:00
Michael Schroeder
8f5a344b82 Add Decisionlistset object to the bindings to support merged decisions
Also make solvidset2str available.
2022-12-08 11:31:33 +01:00
Michael Schroeder
6d9ba1ec05 Support decisions in the bindings 2022-12-07 13:50:53 +01:00
Michael Schroeder
a33167f7dc Adapt testsolv to latest changes 2022-12-07 13:42:31 +01:00
Michael Schroeder
fb7614bab9 Rename merge state to "bits" and put it into the decision info
This makes the returned decision with extra data consist of:
(decision, reason, info, bits, type, from, to, dep)

Merging and printing needs the bits anyway, so providing it
right away makes things easier.

Also add a new SOLVER_DECISIONLIST_MERGEDINFO flag with returnes
"merged" decisions. This is just the "bits" part, the rest
of the decision data stays unchanged.

A new solver_decisionlist_solvables() helper can be used
to return all the decision solvables of a merged or unmerged decision.
2022-12-07 13:37:40 +01:00