]>
git.ipfire.org Git - thirdparty/libsolv.git/log
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
Michael Schroeder [Thu, 15 Sep 2022 14:11:38 +0000 (16:11 +0200)]
Implement getting the releasever from the base product on SUSE
Michael Schroeder [Wed, 14 Sep 2022 09:55:45 +0000 (11:55 +0200)]
Do not autouninstall suse ptf packages
Michael Schroeder [Tue, 13 Sep 2022 13:22:52 +0000 (15:22 +0200)]
Check subpackage length when parsing pubkeys
Michael Schroeder [Thu, 15 Sep 2022 13:20:01 +0000 (15:20 +0200)]
Merge pull request #504 from lnussel/plaindir
solv: add plaindir repo support
Michael Schroeder [Fri, 9 Sep 2022 12:10:16 +0000 (14:10 +0200)]
Add functions to make proof reporting easier
solver_get_learnt: return all rearnt rules used in the proof
of a problem or another learnt rule.
solver_get_proof: return the decisions that led to the
problem or learnt rule.
Note that this is experimental and subject to change. We will
need to add some sorting code to solver_get_proof() to group
similar steps, but this means that we need to get the
ruleinfo for the involved rules. But in that case we can
as well also return the ruleinfo data with the call.
Michael Schroeder [Fri, 9 Sep 2022 12:08:58 +0000 (14:08 +0200)]
Prefer SOLVER_RULE_PKG_SAME_NAME in solver_ruleinfo
Michael Schroeder [Wed, 31 Aug 2022 08:53:53 +0000 (10:53 +0200)]
Merge pull request #505 from jon-turney/fix-dup-reuse-crash
Ensure duplinvolvedmap_all is reset when a solver is reused
Jon Turney [Sun, 14 Aug 2022 17:45:20 +0000 (18:45 +0100)]
Ensure duplinvolvedmap_all is reset when a solver is reused
Otherwise, if solver is used with a SOLVER_DISTUPGRADE job, then reused
without one, this will cause solver_addduprules() to be called, even
though needduprules is 0, which will crash trying to dereference
solv->dupmap, which is NULL because solver_createdupmaps() hasn't been
called.
Ludwig Nussel [Tue, 12 Jul 2022 14:36:16 +0000 (16:36 +0200)]
github ci: make build more verbose
Ludwig Nussel [Tue, 12 Jul 2022 12:58:13 +0000 (14:58 +0200)]
solv: add plaindir repo support
Michael Schroeder [Fri, 8 Jul 2022 08:34:28 +0000 (10:34 +0200)]
Add SOLVABLE_SIGNATUREDATA to list of verticals
The data is not small and also not used for dependency solving.
Michael Schroeder [Thu, 7 Jul 2022 09:23:21 +0000 (11:23 +0200)]
conda: add support for package signature verification
This commits adds SOLVABLE_SIGNATUREDATA which contains the data
needed to verify the signatures of a package. You will need
to pass CONDA_ADD_WITH_SIGNATUREDATA to the flags in the
repo_add_conda call to enable this.
This is still experimental.
Michael Schroeder [Tue, 5 Jul 2022 11:03:23 +0000 (13:03 +0200)]
Add jsonparser_collect() that can be used to collect the json that is skipped
Michael Schroeder [Wed, 29 Jun 2022 07:19:26 +0000 (09:19 +0200)]
repo_conda: implement support for a global subdir
Michael Schroeder [Mon, 27 Jun 2022 11:55:55 +0000 (13:55 +0200)]
Merge pull request #499 from banjiuqingshan/master
Fix memory leak when using testsolv to execute cases
banjiuqingshan [Sat, 18 Jun 2022 17:43:51 +0000 (01:43 +0800)]
Fix memory leak when using testsolv to execute cases
*resultp will only keep the pointer of the last cycle, which will lead to memory leakage.
This solves the first memory leak problem in issue #496 "==255147==error..."
Michael Schroeder [Fri, 8 Apr 2022 11:43:39 +0000 (13:43 +0200)]
Special case file dependencies in the testcase writer
There's special casing in the reader, so we have to make sure
that complex dependencies starting with a '/' are written
correctly.
Michael Schroeder [Mon, 21 Mar 2022 09:19:54 +0000 (10:19 +0100)]
Add changes, bump version to 0.7.22
Michael Schroeder [Mon, 21 Mar 2022 08:48:55 +0000 (09:48 +0100)]
Support Debian's Multi-Arch indicator
For now just in repo metadata.
Michael Schroeder [Wed, 16 Mar 2022 14:27:52 +0000 (15:27 +0100)]
Add complex_deps requirement to choice1b testcase
Michael Schroeder [Wed, 16 Mar 2022 14:17:20 +0000 (15:17 +0100)]
Improve choice rule generation
New strategy: take the package update map into account when creating
choice rules. This simplifies the code quite a bit. Also check at
the end of the solving if a choice rule led to two packages providing
the same thing. In that case, break the choice rule and re-run the
solver.
Michael Schroeder [Wed, 16 Mar 2022 14:16:42 +0000 (15:16 +0100)]
Add more choicerules tests
Michael Schroeder [Thu, 10 Mar 2022 13:23:34 +0000 (14:23 +0100)]
runtestcases.sh: order the testcases
Michael Schroeder [Mon, 7 Mar 2022 13:44:07 +0000 (14:44 +0100)]
CI: run test in the "build" dir
Michael Schroeder [Mon, 7 Mar 2022 13:41:51 +0000 (14:41 +0100)]
Add github CI
Michael Schroeder [Thu, 3 Mar 2022 14:43:05 +0000 (15:43 +0100)]
Do not silently ignore the userdata if it is too big
Instead error out when writing the solv file.
Michael Schroeder [Thu, 3 Mar 2022 14:35:39 +0000 (15:35 +0100)]
Fix duplicate line in the choice2.t testcase
Michael Schroeder [Thu, 3 Mar 2022 14:35:00 +0000 (15:35 +0100)]
Support dumping of the order edges in testcases
Michael Schroeder [Thu, 3 Mar 2022 14:28:01 +0000 (15:28 +0100)]
Start v5 pubkey support
Michael Schroeder [Thu, 3 Mar 2022 13:42:46 +0000 (14:42 +0100)]
Support SOLVABLE_PREREQ_IGNOREINST in the ordering code
This helps to avoid a couple of dependency cycles.
This commit also fixes the cycle breaking code looking at the
wrong package for uninst->uninst edges.
Michael Schroeder [Wed, 2 Mar 2022 14:15:13 +0000 (15:15 +0100)]
Tweak description of rule types in the bindings documentation
Michael Schroeder [Fri, 25 Feb 2022 16:34:28 +0000 (17:34 +0100)]
Add changes, bump version to 0.7.21
Michael Schroeder [Fri, 25 Feb 2022 16:21:17 +0000 (17:21 +0100)]
solv format: support storing of package dependencies in a compressed block
Using a block enables us to do decent compression, which makes it
possible to retain the original dependency order
I.e. no more REPOKEY_TYPE_REL_IDARRAY hacksA.
Writing this format is currently turned off but will be made the default
after the next release.
Michael Schroeder [Fri, 25 Feb 2022 15:47:21 +0000 (16:47 +0100)]
Add support for storing user data in a solv file
Userdata can be arbritrary (binary)data with a maximum size of
65535 bytes. It can be read without reading the complete
solv file, but do not forget to rewind the fp after reading
the user data.
New functions:
void
void repowriter_set_userdata(Repowriter *writer, const void *data, int len)
int solv_read_userdata(FILE *fp, unsigned char **datap, int *lenp)
Michael Schroeder [Fri, 25 Feb 2022 10:39:13 +0000 (11:39 +0100)]
Add const to the first argument of solv_memdump/solv_memdup2