]> git.ipfire.org Git - thirdparty/libsolv.git/log
thirdparty/libsolv.git
2 years agoFix type check broken by commit 26fcfa714a29d1feb393e9a61f9d1a04556866a6
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.

2 years agoAdd a testcase for orphaned package handling in choice rules
Michael Schroeder [Fri, 11 Nov 2022 12:22:31 +0000 (13:22 +0100)] 
Add a testcase for orphaned package handling in choice rules

2 years agoImplement getting the releasever from the base product on SUSE
Michael Schroeder [Thu, 15 Sep 2022 14:11:38 +0000 (16:11 +0200)] 
Implement getting the releasever from the base product on SUSE

2 years agoDo not autouninstall suse ptf packages
Michael Schroeder [Wed, 14 Sep 2022 09:55:45 +0000 (11:55 +0200)] 
Do not autouninstall suse ptf packages

2 years agoCheck subpackage length when parsing pubkeys
Michael Schroeder [Tue, 13 Sep 2022 13:22:52 +0000 (15:22 +0200)] 
Check subpackage length when parsing pubkeys

2 years agoMerge pull request #504 from lnussel/plaindir
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

2 years agoAdd functions to make proof reporting easier
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.

2 years agoPrefer SOLVER_RULE_PKG_SAME_NAME in solver_ruleinfo
Michael Schroeder [Fri, 9 Sep 2022 12:08:58 +0000 (14:08 +0200)] 
Prefer SOLVER_RULE_PKG_SAME_NAME in solver_ruleinfo

2 years agoMerge pull request #505 from jon-turney/fix-dup-reuse-crash
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

2 years agoEnsure duplinvolvedmap_all is reset when a solver is reused 505/head
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.

3 years agogithub ci: make build more verbose 504/head
Ludwig Nussel [Tue, 12 Jul 2022 14:36:16 +0000 (16:36 +0200)] 
github ci: make build more verbose

3 years agosolv: add plaindir repo support
Ludwig Nussel [Tue, 12 Jul 2022 12:58:13 +0000 (14:58 +0200)] 
solv: add plaindir repo support

3 years agoAdd SOLVABLE_SIGNATUREDATA to list of verticals
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.

3 years agoconda: add support for package signature verification
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.

3 years agoAdd jsonparser_collect() that can be used to collect the json that is skipped
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

3 years agorepo_conda: implement support for a global subdir
Michael Schroeder [Wed, 29 Jun 2022 07:19:26 +0000 (09:19 +0200)] 
repo_conda: implement support for a global subdir

3 years agoMerge pull request #499 from banjiuqingshan/master
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

3 years agoFix memory leak when using testsolv to execute cases 499/head
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..."

3 years agoSpecial case file dependencies in the testcase writer
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.

3 years agoAdd changes, bump version to 0.7.22 0.7.22
Michael Schroeder [Mon, 21 Mar 2022 09:19:54 +0000 (10:19 +0100)] 
Add changes, bump version to 0.7.22

3 years agoSupport Debian's Multi-Arch indicator
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.

3 years agoAdd complex_deps requirement to choice1b testcase
Michael Schroeder [Wed, 16 Mar 2022 14:27:52 +0000 (15:27 +0100)] 
Add complex_deps requirement to choice1b testcase

3 years agoImprove choice rule generation
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.

3 years agoAdd more choicerules tests
Michael Schroeder [Wed, 16 Mar 2022 14:16:42 +0000 (15:16 +0100)] 
Add more choicerules tests

3 years agoruntestcases.sh: order the testcases
Michael Schroeder [Thu, 10 Mar 2022 13:23:34 +0000 (14:23 +0100)] 
runtestcases.sh: order the testcases

3 years agoCI: run test in the "build" dir
Michael Schroeder [Mon, 7 Mar 2022 13:44:07 +0000 (14:44 +0100)] 
CI: run test in the "build" dir

3 years agoAdd github CI
Michael Schroeder [Mon, 7 Mar 2022 13:41:51 +0000 (14:41 +0100)] 
Add github CI

3 years agoDo not silently ignore the userdata if it is too big
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.

3 years agoFix duplicate line in the choice2.t testcase
Michael Schroeder [Thu, 3 Mar 2022 14:35:39 +0000 (15:35 +0100)] 
Fix duplicate line in the choice2.t testcase

3 years agoSupport dumping of the order edges in testcases
Michael Schroeder [Thu, 3 Mar 2022 14:35:00 +0000 (15:35 +0100)] 
Support dumping of the order edges in testcases

3 years agoStart v5 pubkey support
Michael Schroeder [Thu, 3 Mar 2022 14:28:01 +0000 (15:28 +0100)] 
Start v5 pubkey support

3 years agoSupport SOLVABLE_PREREQ_IGNOREINST in the ordering code
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.

3 years agoTweak description of rule types in the bindings documentation
Michael Schroeder [Wed, 2 Mar 2022 14:15:13 +0000 (15:15 +0100)] 
Tweak description of rule types in the bindings documentation

3 years agoAdd changes, bump version to 0.7.21 0.7.21
Michael Schroeder [Fri, 25 Feb 2022 16:34:28 +0000 (17:34 +0100)] 
Add changes, bump version to 0.7.21

3 years agosolv format: support storing of package dependencies in a compressed block
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.

3 years agoAdd support for storing user data in a solv file
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)

3 years agoAdd const to the first argument of solv_memdump/solv_memdup2
Michael Schroeder [Fri, 25 Feb 2022 10:39:13 +0000 (11:39 +0100)] 
Add const to the first argument of solv_memdump/solv_memdup2

3 years agoSimplify pool_vendor2mask implementation
Michael Schroeder [Wed, 23 Feb 2022 09:37:28 +0000 (10:37 +0100)] 
Simplify pool_vendor2mask implementation

3 years agotestcase: implement dumping of a configured custom vendorcheck
Michael Schroeder [Tue, 22 Feb 2022 17:07:21 +0000 (18:07 +0100)] 
testcase: implement dumping of a configured custom vendorcheck

This is for libzypp, which uses a custom vendorcheck function.

3 years agoAllow querying of the custom vendor check function
Michael Schroeder [Tue, 22 Feb 2022 17:06:29 +0000 (18:06 +0100)] 
Allow querying of the custom vendor check function

3 years agopoolvendor: fix a NULL pointer reference if more than one vendor class is configured
Michael Schroeder [Tue, 22 Feb 2022 17:05:41 +0000 (18:05 +0100)] 
poolvendor: fix a NULL pointer reference if more than one vendor class is configured

3 years agotestsolv: show an error if the testcase could not be written
Michael Schroeder [Tue, 22 Feb 2022 17:04:30 +0000 (18:04 +0100)] 
testsolv: show an error if the testcase could not be written

3 years agoDo not replace noarch problem rules with arch dependent ones
Michael Schroeder [Wed, 16 Feb 2022 14:40:28 +0000 (15:40 +0100)] 
Do not replace noarch problem rules with arch dependent ones

3 years agoFix to compile
Michael Andres [Fri, 18 Feb 2022 10:59:10 +0000 (11:59 +0100)] 
Fix to compile

3 years agoMerge pull request #491 from wolfv/split_rules_printing
Michael Schroeder [Fri, 18 Feb 2022 09:01:43 +0000 (10:01 +0100)] 
Merge pull request #491 from wolfv/split_rules_printing

split rules number printing into seperate statements

3 years agosplit rules number printing into seperate statements 491/head
Wolf Vollprecht [Fri, 18 Feb 2022 08:27:59 +0000 (09:27 +0100)] 
split rules number printing into seperate statements

3 years agoMerge pull request #488 from niner/patch-1
Michael Schroeder [Wed, 9 Feb 2022 09:01:07 +0000 (10:01 +0100)] 
Merge pull request #488 from niner/patch-1

Fix segfault on conflict resolution when using bindings

3 years agoFix segfault on conflict resolution when using bindings 488/head
niner [Tue, 8 Feb 2022 17:10:54 +0000 (18:10 +0100)] 
Fix segfault on conflict resolution when using bindings

Solutionelement objects were created with a wrong solutionid (i.e. the
solution element id was used for the solutionid field). This led to invalid
array indexes when trying to read the extraflags which then escalated
into a segfault. Fix by setting solutionid correctly in the Solutionelement
constructor.

3 years agoFix split provides not working if the update includes a forbidden vendor change
Michael Schroeder [Tue, 8 Feb 2022 11:41:58 +0000 (12:41 +0100)] 
Fix split provides not working if the update includes a forbidden vendor change

Check the feature rule instead of the update rule and make sure that the
old package really is updated.

3 years agoMerge pull request #486 from kontura/toolversion
Michael Schroeder [Thu, 27 Jan 2022 09:52:46 +0000 (10:52 +0100)] 
Merge pull request #486 from kontura/toolversion

Allow accessing toolversion at runtime and increase it

3 years agoAllow accessing toolversion at runtime and increase it 486/head
Aleš Matěj [Thu, 27 Jan 2022 07:38:27 +0000 (08:38 +0100)] 
Allow accessing toolversion at runtime and increase it

3 years agoRename Iti to Itm while we can.
Michael Schroeder [Tue, 30 Nov 2021 09:42:55 +0000 (10:42 +0100)] 
Rename Iti to Itm while we can.

3 years agoDrop sys/cdefs.h include from qsort_r.c
Michael Schroeder [Tue, 30 Nov 2021 09:40:37 +0000 (10:40 +0100)] 
Drop sys/cdefs.h include from qsort_r.c

The cdefs.h header is not always available, and it gets pulled
in from the stdlib include anyway (at least in openbsd).

3 years agoSupport the install time in the testcase format
Michael Schroeder [Fri, 26 Nov 2021 10:32:37 +0000 (11:32 +0100)] 
Support the install time in the testcase format

3 years agoMerge pull request #477 from lukash/rename-requires
Michael Schroeder [Mon, 29 Nov 2021 11:02:03 +0000 (12:02 +0100)] 
Merge pull request #477 from lukash/rename-requires

Add an ifdef allowing to rename conflicting Solvable::requires

3 years agoSupport dumping of the transaction order in testcases
Michael Schroeder [Fri, 12 Nov 2021 15:52:23 +0000 (16:52 +0100)] 
Support dumping of the transaction order in testcases

3 years agoTry to keep packages from a cycle close togther in the transaction order
Michael Schroeder [Fri, 12 Nov 2021 15:50:33 +0000 (16:50 +0100)] 
Try to keep packages from a cycle close togther in the transaction order

If there are multiple free-to-install packages and we pick a
package from a cycle, we should try to finish the cycle as
fast as possible to keep the time where we have an inconsistent
system as small as possible.

3 years agoAdd an ifdef allowing to rename Solvable dependency members 477/head
Lukáš Hrázký [Fri, 15 Oct 2021 13:51:19 +0000 (15:51 +0200)] 
Add an ifdef allowing to rename Solvable dependency members

In C++20 "requires" is a new keyword, causing a conflict with the
Solvable::requires attribute. From the outside this can only be fixed
with an ugly preprocessor redefinition of the symbol around each libsolv
header include.

This commit adds an #ifdef allowing to rename the dep attributes in case
C++20 or higher is used, which can be easily defined in one place in the
libolv user's build system.

3 years agoSupport zstd compressed control files in debian packages
Michael Schroeder [Mon, 18 Oct 2021 08:53:24 +0000 (10:53 +0200)] 
Support zstd compressed control files in debian packages

3 years agoFinish strict repo priority support
Michael Schroeder [Fri, 15 Oct 2021 09:03:12 +0000 (11:03 +0200)] 
Finish strict repo priority support

- add flag to bindings
- support flag/ruletype in testcases
- support strict repo prio problems in solution generation
- implement automatic disabling of strict repo rules due to install jobs
- add a testcase

3 years agoMerge pull request #459 from adriendelsalle/strict-prio
Michael Schroeder [Fri, 15 Oct 2021 08:17:19 +0000 (10:17 +0200)] 
Merge pull request #459 from adriendelsalle/strict-prio

Implement strict repo priority

3 years agoAdd forgotten bump version line
Michael Schroeder [Mon, 4 Oct 2021 15:55:57 +0000 (17:55 +0200)] 
Add forgotten bump version line

3 years agoMerge pull request #470 from der-gabe/very-minor-doc-improvements
Michael Schroeder [Sat, 25 Sep 2021 21:24:35 +0000 (23:24 +0200)] 
Merge pull request #470 from der-gabe/very-minor-doc-improvements

Very minor doc improvements

3 years agosha2.c: sync _Final function definition with the header file
Michael Schroeder [Sat, 25 Sep 2021 21:19:16 +0000 (23:19 +0200)] 
sha2.c: sync _Final function definition with the header file

Some compilers warn that digest[] is not the same as
digest[SHAXXX_DIGEST_LENGTH].

Fixes issue#464

3 years agoMake repo line parsing not crash if the last argument is missing
Michael Schroeder [Sat, 25 Sep 2021 21:09:44 +0000 (23:09 +0200)] 
Make repo line parsing not crash if the last argument is missing

Fixes issue #473.

3 years agoAdd changes, bump version to 0.7.20 0.7.20
Michael Schroeder [Sat, 25 Sep 2021 20:54:18 +0000 (22:54 +0200)] 
Add changes, bump version to 0.7.20

3 years agoFix misparsing of '&' in attributes with libxml2
Michael Schroeder [Mon, 20 Sep 2021 13:10:38 +0000 (15:10 +0200)] 
Fix misparsing of '&' in attributes with libxml2

For some reason libxml2 insists on re-escaping '&' characters
by substituting them with "&". The rpm dependencies are
stored in attributes, so this is not an academic matter.

Undo the damage done by libxml2 by replacing all & occurences
by a single '&'.

3 years agoChoice rules: treat orphaned packages as newest
Michael Schroeder [Wed, 15 Sep 2021 14:58:41 +0000 (16:58 +0200)] 
Choice rules: treat orphaned packages as newest

Otherwise, they likely get deinstalled when the choice rule
cannot be met.

3 years agoMerge pull request #454 from j-mracek/weak-excludes
Michael Schroeder [Thu, 2 Sep 2021 14:14:38 +0000 (16:14 +0200)] 
Merge pull request #454 from j-mracek/weak-excludes

Add mechanisms to ignore pkgs for weak dependencies

4 years agoAdd mechanisms to ignore pkgs for weak dependencies 454/head
Jaroslav Mracek [Tue, 22 Jun 2021 14:30:45 +0000 (16:30 +0200)] 
Add mechanisms to ignore pkgs for weak dependencies

It adds mechanism to avoid installation of certain packages
to satisfy recommends and supplemented.

4 years agodo not clear providers of a name having a different name 459/head
Adrien DELSALLE [Mon, 9 Aug 2021 11:20:03 +0000 (13:20 +0200)] 
do not clear providers of a name having a different name
it would prevent those solvables for being excluded by strict channel priority

4 years agoimplement strict repo priority
Adrien DELSALLE [Tue, 6 Jul 2021 16:46:52 +0000 (18:46 +0200)] 
implement strict repo priority
add specific rule
add solver flag
add problem message/debug

4 years agoMention Tcl support in description 470/head
Gabriel Niebler [Mon, 9 Aug 2021 12:06:18 +0000 (14:06 +0200)] 
Mention Tcl support in description

4 years agoFix typos
Gabriel Niebler [Mon, 9 Aug 2021 11:16:19 +0000 (13:16 +0200)] 
Fix typos

4 years agoFix grammar
Gabriel Niebler [Mon, 9 Aug 2021 11:12:16 +0000 (13:12 +0200)] 
Fix grammar

4 years agoFix typo in libsolv.txt
Gabriel Niebler [Mon, 9 Aug 2021 11:06:27 +0000 (13:06 +0200)] 
Fix typo in libsolv.txt

4 years agoMerge pull request #468 from pkratoch/environments
Michael Schroeder [Fri, 6 Aug 2021 15:33:48 +0000 (17:33 +0200)] 
Merge pull request #468 from pkratoch/environments

Add support for environments in comps xml

4 years agoAdd support for environments in comps xml 468/head
Pavla Kratochvilova [Thu, 1 Jul 2021 11:32:52 +0000 (13:32 +0200)] 
Add support for environments in comps xml

4 years agoMerge pull request #466 from DimStar77/TW_sans_py2
Michael Schroeder [Fri, 30 Jul 2021 14:09:37 +0000 (16:09 +0200)] 
Merge pull request #466 from DimStar77/TW_sans_py2

Build without python2 support on suse_version >= 1550 by default

4 years agoBuild without python2 support on suse_version >= 1550 by default 466/head
Dominique Leuenberger [Fri, 30 Jul 2021 11:56:33 +0000 (13:56 +0200)] 
Build without python2 support on suse_version >= 1550 by default

4 years agoMerge pull request #462 from ignatenkobrain/pyssize_t
Michael Schroeder [Mon, 19 Jul 2021 08:59:05 +0000 (10:59 +0200)] 
Merge pull request #462 from ignatenkobrain/pyssize_t

Fix compatibility with Python 3.10

4 years agoFix compatibility with Python 3.10 462/head
Igor Raits [Sun, 18 Jul 2021 16:47:05 +0000 (18:47 +0200)] 
Fix compatibility with Python 3.10

Fixes: https://github.com/openSUSE/libsolv/issues/461
Signed-off-by: Igor Raits <igor.raits@gmail.com>
4 years agoMerge pull request #460 from wolfv/memcpy_to_memmove
Michael Schroeder [Thu, 8 Jul 2021 07:50:50 +0000 (09:50 +0200)] 
Merge pull request #460 from wolfv/memcpy_to_memmove

use memmove for overlapping regions

4 years agouse memmove for overlapping regions 460/head
Wolf Vollprecht [Thu, 8 Jul 2021 07:13:19 +0000 (09:13 +0200)] 
use memmove for overlapping regions

4 years agoRead/write conda track features in testcases
Michael Schroeder [Mon, 28 Jun 2021 09:58:28 +0000 (11:58 +0200)] 
Read/write conda track features in testcases

Should have been in commit c7d13d05a587cec227fa22cc8e4b403e85b778c6

4 years agoMerge pull request #445 from jrohel/fix/memleak_in_swig_python_wrapper
Michael Schroeder [Thu, 8 Apr 2021 14:31:48 +0000 (16:31 +0200)] 
Merge pull request #445 from jrohel/fix/memleak_in_swig_python_wrapper

Fix: Memory leaks in SWIG generated code (for Python)

4 years agoFix: Memory leaks in SWIG generated code (for Python) 445/head
Jaroslav Rohel [Thu, 8 Apr 2021 10:17:09 +0000 (12:17 +0200)] 
Fix: Memory leaks in SWIG generated code (for Python)

There were memory leaks in the `Chksum_from_bin`, `Chksum_add`,
`SolvFp_write` functions wrapper for Python.

The problem was in "freearg" typemap argument defined in "solv.i".
Therefore, the typemap was not applied.

4 years agoAdd changes, bump version to 0.7.19 0.7.19
Michael Schroeder [Wed, 7 Apr 2021 12:57:00 +0000 (14:57 +0200)] 
Add changes, bump version to 0.7.19

4 years agoMake zchunkopen a bit easier to understand
Michael Schroeder [Tue, 6 Apr 2021 14:01:29 +0000 (16:01 +0200)] 
Make zchunkopen a bit easier to understand

4 years agoMerge pull request #444 from jrohel/fix/resources_in_xxopen
Michael Schroeder [Tue, 6 Apr 2021 13:54:16 +0000 (15:54 +0200)] 
Merge pull request #444 from jrohel/fix/resources_in_xxopen

Fix: lzopen, zstdopen, zchunkopen

4 years agoFix: zchunkopen: resources leaks, don't close supplied fd 444/head
Jaroslav Rohel [Tue, 30 Mar 2021 06:42:31 +0000 (08:42 +0200)] 
Fix: zchunkopen: resources leaks, don't close supplied fd

System variant:
- resource leaks when `zck_init_read` or `zck_init_write` fails
- supplied fd will be closed if `zck_create` fails

Libsolv limited zchunk implementation:
- resource leak when `strcmp(mode, "r") != 0`
- supplied fd will be closed if `solv_zchunk_open` fails (Fix is thread
  unsafe. However the original version caused a double-close in the caller
  function and was thread unsafe too.)

4 years agoFix: lzopen and zstdopen: don't close supplied fd
Jaroslav Rohel [Mon, 29 Mar 2021 15:16:54 +0000 (17:16 +0200)] 
Fix: lzopen and zstdopen: don't close supplied fd

In the case of failure of some functions, the `fp` file stream has been
closed. And the stream closed the associated supplied `fd` file descriptor.

The caller then closed the closed descriptor again (eg `curlfopen` in
`repoinfo_download.c`: `if (!Fp) close (fd);`) -> double_close.
In multithreaded software risk of race conditions. Another thread open
another file and reuse just closed file descriptor. The caller
then closes the file of another thread.

4 years agoFix: Use "solv_free" for memory allocated by "solv_calloc"
Jaroslav Rohel [Tue, 6 Apr 2021 07:17:27 +0000 (09:17 +0200)] 
Fix: Use "solv_free" for memory allocated by "solv_calloc"

4 years agoChange calloc/realloc calls to solv_calloc/solv_realloc
Michael Schroeder [Wed, 31 Mar 2021 11:46:16 +0000 (13:46 +0200)] 
Change calloc/realloc calls to solv_calloc/solv_realloc

Spotted by Jaroslav Rohel, thanks!

4 years agoMerge pull request #443 from tl-hbk/fix_resolve_jobrules_segfault
Michael Schroeder [Wed, 31 Mar 2021 11:39:57 +0000 (13:39 +0200)] 
Merge pull request #443 from tl-hbk/fix_resolve_jobrules_segfault

Fix segfault in resolve_jobrules

4 years agoFix segfault in resolve_jobrules 443/head
Thomas Lam [Tue, 30 Mar 2021 12:33:52 +0000 (05:33 -0700)] 
Fix segfault in resolve_jobrules

In selectandinstall sometimes rules are added and a realloc is required if there's
no more memory available in the allocated block.  r-- would just decrement the old
pointer but the realloc could return a completely different block of memory

4 years agotweak last commit
Michael Schroeder [Mon, 29 Mar 2021 13:07:55 +0000 (15:07 +0200)] 
tweak last commit

4 years agoMerge pull request #442 from jrohel/fix/memory_leaks
Michael Schroeder [Mon, 29 Mar 2021 13:06:44 +0000 (15:06 +0200)] 
Merge pull request #442 from jrohel/fix/memory_leaks

Fix memory leaks

4 years agoFix memory leaks 442/head
Jaroslav Rohel [Mon, 29 Mar 2021 10:46:31 +0000 (12:46 +0200)] 
Fix memory leaks

4 years agoAdd changes, bump version to 0.7.18 0.7.18
Michael Schroeder [Fri, 26 Mar 2021 13:18:57 +0000 (14:18 +0100)] 
Add changes, bump version to 0.7.18