]>
git.ipfire.org Git - thirdparty/libsolv.git/log
Luca Boccassi [Sat, 11 Nov 2023 16:26:58 +0000 (16:26 +0000)]
Fix various typos found by Lintian
Michael Schroeder [Wed, 8 Nov 2023 12:53:11 +0000 (13:53 +0100)]
repo_write: add a small cache for putinowndirpool()
This helps a lot with diskusage data or filelists.
Michael Schroeder [Tue, 7 Nov 2023 11:46:48 +0000 (12:46 +0100)]
Add changes, bump version to 0.7.26
Michael Schroeder [Tue, 7 Nov 2023 10:54:09 +0000 (11:54 +0100)]
repo_rpmdb.c: Do not use deprecated headerUnload with newer rpm versions
We check the definition of RPM_MASK_TYPE to find out it rpm is
new enough.
Michael Schroeder [Wed, 27 Sep 2023 15:24:34 +0000 (17:24 +0200)]
Fix evr roundtrip
Remove the "0:" stripping from the evr in testcase_read. Messing
with the evr is not our business, we need to reproduce the data
as faithful as possible.
Michael Schroeder [Thu, 14 Sep 2023 12:18:10 +0000 (14:18 +0200)]
Add changes, bump version to 0.7.25
Michael Schroeder [Tue, 12 Sep 2023 11:14:17 +0000 (13:14 +0200)]
Support rich deps in SOLVABLE_PREREQ_IGNOREINST
Michael Schroeder [Wed, 6 Sep 2023 12:10:17 +0000 (14:10 +0200)]
Do not minimize from an installed to an uninstalled package when checking recommends
Also prune to installed packages (or their update candidates)
when doing extra reordering, i.e. when the update roles are
not yet resolved.
Fixes issue #539
Michael Schroeder [Fri, 21 Jul 2023 11:53:46 +0000 (13:53 +0200)]
repo_conda: overwrite the package subdir with the info subdir if there is a conflict
This is what classic conda does, so we also need to do it.
Fixes issue #529
Michael Schroeder [Thu, 20 Jul 2023 09:50:00 +0000 (11:50 +0200)]
Save memory in repo_updateinfoxml by not interleaving repo_addflexarray calls
Mixing repo_addflexarray calls will make the code moving the arrays
in the idarraydata all the time as it cannot append to the arrays.
So first collect the array contents of the collection flexarray and
then add it in one go.
This is based on pull request #533 by Aleš Matěj <amatej@redhat.com>.
Michael Schroeder [Mon, 22 May 2023 08:28:01 +0000 (10:28 +0200)]
Clean up header files
Move type declarations of Repo/Repodata/Solvable into pooltypes.h.
Michael Schroeder [Mon, 22 May 2023 08:07:03 +0000 (10:07 +0200)]
Merge pull request #530 from AntoinePrv/fix-header
Fix incomplete headers
Michael Schroeder [Fri, 19 May 2023 13:17:53 +0000 (15:17 +0200)]
choice rules: also do solver_choicerulecheck for package downgrades
Fixes issue #514
AntoinePrv [Wed, 3 May 2023 12:59:23 +0000 (14:59 +0200)]
Fix incomplete headers
Michael Schroeder [Fri, 21 Apr 2023 14:15:10 +0000 (16:15 +0200)]
Only disable infarch rules on erase if the package was in lock-step
Fiexes issue #528
Michael Schroeder [Wed, 19 Apr 2023 11:09:10 +0000 (13:09 +0200)]
Allow to break arch lock-step on erase operations
We allow it if SOLVER_SETARCH is (auto-)set in the erase job.
Michael Schroeder [Wed, 19 Apr 2023 07:50:58 +0000 (09:50 +0200)]
Add 'feature complex_deps' to ifelse_rec.t testcase
Michael Schroeder [Tue, 18 Apr 2023 10:36:40 +0000 (12:36 +0200)]
Add testcase for last commit
Michael Schroeder [Tue, 18 Apr 2023 09:57:50 +0000 (11:57 +0200)]
Treat condition both as positive and negative literal in pool_add_pos_literals_complex_dep
That's because (A IF B ELSE C) gets rewritten to (A OR ~B) AND (C OR B) and
(A UNLESS B ELSE C) gets rewritten to (A AND ~B) OR (C AND B). In both
cases we have A, B, ~B, C.
This resolves issue #527
Michael Schroeder [Thu, 13 Apr 2023 14:08:45 +0000 (16:08 +0200)]
Add changes, bump version to 0.7.24
Michael Schroeder [Thu, 13 Apr 2023 14:01:36 +0000 (16:01 +0200)]
Add back findutils requires for libsolv-tools
It was deleted by accident in commit
755462c2b06b079f11d431aa44c7a6146cfea424 .
Michael Schroeder [Thu, 23 Feb 2023 09:59:41 +0000 (10:59 +0100)]
Merge pull request #520 from ffontaine/master
Fix build without C++
Michael Schroeder [Wed, 15 Feb 2023 11:46:49 +0000 (12:46 +0100)]
Merge pull request #521 from AntoinePrv/headers
Fix conda headers
AntoinePrv [Wed, 15 Feb 2023 11:08:49 +0000 (12:08 +0100)]
fix: header extern C and guard
Fabrice Fontaine [Sun, 12 Feb 2023 14:27:27 +0000 (15:27 +0100)]
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>
Michael Schroeder [Tue, 31 Jan 2023 11:52:49 +0000 (12:52 +0100)]
Document BPOOL_FLAG_NOWHATPROVIDESAUX and POOL_FLAG_WHATPROVIDESWITHDISABLED
At least in libsolv-bindings...
Michael Schroeder [Fri, 13 Jan 2023 10:46:40 +0000 (11:46 +0100)]
Use SOLVER_DECISIONLIST_SORTED in showwhy()
Michael Schroeder [Fri, 13 Jan 2023 10:44:53 +0000 (11:44 +0100)]
Implement decision sorting for package decisionlists
We only sort blocks of unit rule decisions for now.
Michael Schroeder [Mon, 9 Jan 2023 11:34:34 +0000 (12:34 +0100)]
Support x86_64_v[234] architecture levels
Michael Schroeder [Thu, 22 Dec 2022 09:34:12 +0000 (10:34 +0100)]
Use pool instread of solv->pool where we can
Michael Schroeder [Wed, 21 Dec 2022 13:18:16 +0000 (14:18 +0100)]
Use solver_problem2str() convenience function in the demo solver
Michael Schroeder [Wed, 21 Dec 2022 12:52:41 +0000 (13:52 +0100)]
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.
Michael Schroeder [Wed, 21 Dec 2022 12:32:59 +0000 (13:32 +0100)]
Fix typo in comment
Michael Schroeder [Tue, 20 Dec 2022 10:36:11 +0000 (11:36 +0100)]
Split is_obsoleting() from policy_findupdatepackages
This makes the code a bit more readable. Plus, we can reuse
this function in the future.
Michael Schroeder [Tue, 20 Dec 2022 09:51:15 +0000 (10:51 +0100)]
Merge pull request #516 from hroncok/no_distutils
Python: Remove usage of the deprecated distutils module
Miro Hrončok [Mon, 19 Dec 2022 22:07:57 +0000 (23:07 +0100)]
Python: Remove usage of the deprecated distutils module
Python 3.12+ no longer has distutils.
See https://peps.python.org/pep-0632/
Michael Schroeder [Mon, 19 Dec 2022 14:51:41 +0000 (15:51 +0100)]
Fix pool_whatmatchesdep's SOLVABLE_NAME hack
Michael Schroeder [Mon, 19 Dec 2022 13:51:10 +0000 (14:51 +0100)]
Speed up obsoletes handling in update rule generation a bit
Michael Schroeder [Mon, 19 Dec 2022 13:49:46 +0000 (14:49 +0100)]
Add testcase for yumobs pruning
Michael Schroeder [Fri, 16 Dec 2022 10:01:48 +0000 (11:01 +0100)]
Improve pruning of yumobs branches
Michael Schroeder [Thu, 15 Dec 2022 10:51:14 +0000 (11:51 +0100)]
Add alternative/yumobs.t testcase
Michael Schroeder [Thu, 15 Dec 2022 10:50:04 +0000 (11:50 +0100)]
Do not report alternatives for yumobs splits
Michael Schroeder [Thu, 15 Dec 2022 10:02:06 +0000 (11:02 +0100)]
Move alternatives introspection code into decision.c
Michael Schroeder [Thu, 15 Dec 2022 10:00:47 +0000 (11:00 +0100)]
Add release to obsoletes in the alternative/update.t test
Otherwise it fails on debian.
Michael Schroeder [Thu, 15 Dec 2022 09:26:27 +0000 (10:26 +0100)]
Require rpm dependencies in alternative/learnt
The pool_dep2str() output depends on the disttype
Michael Schroeder [Wed, 14 Dec 2022 16:02:02 +0000 (17:02 +0100)]
Add testcases for the alternative introspection
Michael Schroeder [Wed, 14 Dec 2022 16:01:23 +0000 (17:01 +0100)]
Adapt testcases to the last change
Michael Schroeder [Wed, 14 Dec 2022 15:58:28 +0000 (16:58 +0100)]
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...
Michael Schroeder [Wed, 14 Dec 2022 15:57:38 +0000 (16:57 +0100)]
Handle learnt rules in solver_alternativeinfo()
Michael Schroeder [Wed, 14 Dec 2022 15:47:09 +0000 (16:47 +0100)]
Swap from/to in the ruleinfo instead of just overwriting
Otherwise we report a wrong providing package.
Michael Schroeder [Tue, 13 Dec 2022 13:06:12 +0000 (14:06 +0100)]
Update checksum types in bindings documentation
Michael Schroeder [Tue, 13 Dec 2022 10:52:50 +0000 (11:52 +0100)]
Add changes, bump version to 0.7.23
Michael Schroeder [Tue, 13 Dec 2022 10:22:29 +0000 (11:22 +0100)]
solv: Do not print duchanges if there is no change
Michael Schroeder [Tue, 13 Dec 2022 10:19:02 +0000 (11:19 +0100)]
Add a DISABLE_UPDATE entry if we need to disable a best rules
Michael Schroeder [Tue, 13 Dec 2022 09:45:55 +0000 (10:45 +0100)]
Add solver_alternativeinfo() function
This code is split off from the solver_alternative2str() function
so that library users can offer translated messages.
Michael Schroeder [Tue, 13 Dec 2022 09:01:35 +0000 (10:01 +0100)]
Make get_decision also return a decision for unrelated solvables
Consistency with get_decisionlist().
Michael Schroeder [Tue, 13 Dec 2022 08:59:58 +0000 (09:59 +0100)]
Add documentation for solver.get_decision()
And no longer document the obsolete describe_decision method.
Michael Schroeder [Mon, 12 Dec 2022 15:21:29 +0000 (16:21 +0100)]
Improve solver_alternative2str
Add code for SOLVER_RULE_BEST and SOLVER_RULE_PKG_RECOMMENDS.
Michael Schroeder [Mon, 12 Dec 2022 15:18:43 +0000 (16:18 +0100)]
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.
Michael Schroeder [Mon, 12 Dec 2022 14:55:20 +0000 (15:55 +0100)]
Document pool.solvableset2str and pool.solvidset2str
Michael Schroeder [Mon, 12 Dec 2022 14:44:54 +0000 (15:44 +0100)]
Document the Alternative, Decision, Decisionset classes
Michael Schroeder [Mon, 12 Dec 2022 14:41:52 +0000 (15:41 +0100)]
Rename solver.all_alternatives to solver.alternatives
Make it consistent with problem.solutions()
Michael Schroeder [Mon, 12 Dec 2022 14:19:36 +0000 (15:19 +0100)]
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.
Michael Schroeder [Mon, 12 Dec 2022 09:06:07 +0000 (10:06 +0100)]
Make use of the new solver_decisionlist_merged() function
It's faster and simpler than the old way.
Michael Schroeder [Mon, 12 Dec 2022 09:03:30 +0000 (10:03 +0100)]
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.
Michael Schroeder [Fri, 9 Dec 2022 14:34:41 +0000 (15:34 +0100)]
bindings: add decisionlistset.decisions() to get the merged decisions
Michael Schroeder [Thu, 8 Dec 2022 12:36:34 +0000 (13:36 +0100)]
Small code refactoring, no functional changes
Michael Schroeder [Thu, 8 Dec 2022 10:54:08 +0000 (11:54 +0100)]
Small code cleanup, no functional changes
Michael Schroeder [Thu, 8 Dec 2022 10:53:12 +0000 (11:53 +0100)]
Add proof reporting to the 'solv' example tool
Michael Schroeder [Thu, 8 Dec 2022 10:51:56 +0000 (11:51 +0100)]
Add -Wno-missing-braces when compiling tcl bindings
Michael Schroeder [Thu, 8 Dec 2022 10:31:33 +0000 (11:31 +0100)]
Add Decisionlistset object to the bindings to support merged decisions
Also make solvidset2str available.
Michael Schroeder [Wed, 7 Dec 2022 12:50:53 +0000 (13:50 +0100)]
Support decisions in the bindings
Michael Schroeder [Wed, 7 Dec 2022 12:42:31 +0000 (13:42 +0100)]
Adapt testsolv to latest changes
Michael Schroeder [Wed, 7 Dec 2022 12:37:40 +0000 (13:37 +0100)]
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.
Michael Schroeder [Tue, 6 Dec 2022 14:47:16 +0000 (15:47 +0100)]
Add forgotten SOLVER_REASON_UNRELATED to solver_reason2str
Michael Schroeder [Tue, 6 Dec 2022 14:43:35 +0000 (15:43 +0100)]
Refactor linkedpkg handling
Only export one find_autopackage_name function to be used
for language lookups. Also make a couple of internal
functions static.
Michael Schroeder [Tue, 6 Dec 2022 14:26:03 +0000 (15:26 +0100)]
Adapt testsolv to the decision introspection changes
Michael Schroeder [Tue, 6 Dec 2022 14:24:32 +0000 (15:24 +0100)]
Add support for decisioninfo merging
This is not 100% fixed, the names might still change
if I come up with something better.
Also add code to stringify the decision reason.
Michael Schroeder [Tue, 6 Dec 2022 14:07:33 +0000 (15:07 +0100)]
Unify proof generation with decisionlist query
Both generate a list of decisions, so having a unified API
makes sense.
The returned decisions are of the form (decision, reason, info)
unless the WITHINFO flag is used, which returns
(decision, reason, info, type, from, to dep) heptlets.
Also move decision introspection code into a new decisions.c
file.
Michael Schroeder [Tue, 6 Dec 2022 13:52:22 +0000 (14:52 +0100)]
Provide new solvidset2str() function to print a set of solvables
This is multipkg() from testcase.c. We'll switch to the new
function in a later commit.
Michael Schroeder [Thu, 1 Dec 2022 10:42:07 +0000 (11:42 +0100)]
More tweaks for the proof reporting in testsolv
Michael Schroeder [Thu, 1 Dec 2022 10:01:43 +0000 (11:01 +0100)]
proof generation: Try not to end with a SOLVER_RULE_RPM_SAME_NAME rule
They usually get not shown to the user, so it is nicer to have
something else as unsolvable rule.
Also fix sorting and start with negative assertions.
Michael Schroeder [Wed, 30 Nov 2022 15:17:01 +0000 (16:17 +0100)]
Merge pull request #513 from banjiuqingshan/master
fix memory leak caused by commit
1da9bef8
banjiuqingshan [Wed, 30 Nov 2022 13:39:37 +0000 (21:39 +0800)]
fix memory leak caused by commit
1da9bef8
the memory allocated by map_init in solver_disablechoicerules failed to be released in time.
Michael Schroeder [Wed, 30 Nov 2022 11:48:50 +0000 (12:48 +0100)]
Support learnt rules in proof reporting
Michael Schroeder [Wed, 30 Nov 2022 11:46:09 +0000 (12:46 +0100)]
Add premises for learnt rule proofs
We currently set the rule type to zero. This may change in the
future.
Michael Schroeder [Tue, 29 Nov 2022 15:06:47 +0000 (16:06 +0100)]
testsolv: Add -P option that displays the proofs of each problem
Learnt rules are not yet printed.
We might want to move the "multipkg" function in the library in
the future.
Michael Schroeder [Tue, 29 Nov 2022 15:04:15 +0000 (16:04 +0100)]
Add sorting of proof steps
As we need the ruelinfo to do this, we also put them into the
returned data, so we now have (litpkg, rid, type, from, to, dep)
hexels instead of the (litpkg, rid) tupels.
Michael Schroeder [Mon, 28 Nov 2022 09:56:23 +0000 (10:56 +0100)]
Also commit header file
Should have been in commit
607511873490736fafca6dd9081fba5e3fce3e87
Michael Schroeder [Fri, 25 Nov 2022 14:01:39 +0000 (15:01 +0100)]
Fix solver_rule2solvable implementation
It should return a solvable id.
Michael Schroeder [Fri, 25 Nov 2022 13:56:16 +0000 (14:56 +0100)]
Fix ruleinfo for recommends rules
Those are limited versions of pkg rules.
Michael Schroeder [Fri, 25 Nov 2022 10:44:36 +0000 (11:44 +0100)]
Use new solver_get_decisionlist() interface in testsolv's showwhy()
Michael Schroeder [Fri, 25 Nov 2022 10:36:19 +0000 (11:36 +0100)]
Move decisionlist generation into the library
This functionality is useful for multiple programs that use
libsolv, so it does not make sense to duplicate the code
into each of them.
So we now offer solver_get_decisionlist() to get a list of
decisions that let to the installation/deinstallation of a
package. There is also solver_get_decisionlist_multiple() that
can be used if multiple packages should be considered.
The output is a list of (package, reason, info) triplets.
Package is positive for installs, negative for conflicts.
This commits also deprecates solver_describe_weakdep_decision().
it makes more sense to unify weakdep decisions with rule
decisions as both come from package dependencies.
So we now have solver_allweakdepinfos() and solver_weakdepinfo()
that returns the ruleinfo for a weakdep decision. You can then
use solver_ruleinfo2str() to convert the ruleinfo to a string.
Michael Schroeder [Mon, 21 Nov 2022 11:41:15 +0000 (12:41 +0100)]
update showwhy implementation
Use a different output format and simplify the code.
Michael Schroeder [Mon, 21 Nov 2022 11:40:27 +0000 (12:40 +0100)]
Drop "package" prefix in solver_ruleinfo2str
Michael Schroeder [Mon, 21 Nov 2022 10:08:53 +0000 (11:08 +0100)]
Add support for weak rule types to solver_ruleinfo2str
Those rules do not show up in the problem rules, so we did
not need to support them before.
Michael Schroeder [Fri, 18 Nov 2022 14:05:01 +0000 (15:05 +0100)]
Add -W option to show why the solver installed/erased the specified package
This shows everything that led to the decision.
Michael Schroeder [Fri, 18 Nov 2022 14:02:58 +0000 (15:02 +0100)]
Add solver_ruleinfo2str to get information about a rule
This is like solver_problemruleinfo2str, but not with a problem view.
I.e. it does not say that the rule cannot be fulfilled.
Michael Schroeder [Fri, 11 Nov 2022 13:31:30 +0000 (14:31 +0100)]
Fix type check broken by commit
26fcfa714a29d1feb393e9a61f9d1a04556866a6
Caught by our libzypp test cases. I should run them more often.
Michael Schroeder [Fri, 11 Nov 2022 12:22:31 +0000 (13:22 +0100)]
Add a testcase for orphaned package handling in choice rules