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

3391 Commits

Author SHA1 Message Date
Michael Schroeder
c74b6658a6 Conda: add experimental trackfeature minimizing support 2021-06-30 15:03:41 +02:00
Michael Schroeder
636c89b388 Read/write conda track features in testcases
Should have been in commit c7d13d05a5
2021-06-28 11:58:28 +02:00
Michael Schroeder
e2ed3f290d Merge pull request #445 from jrohel/fix/memleak_in_swig_python_wrapper
Fix: Memory leaks in SWIG generated code (for Python)
2021-04-08 16:31:48 +02:00
Jaroslav Rohel
8615575144 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.
2021-04-08 12:46:33 +02:00
Michael Schroeder
c773294be6 Add changes, bump version to 0.7.19 0.7.19 2021-04-07 14:57:00 +02:00
Michael Schroeder
93159d978b Make zchunkopen a bit easier to understand 2021-04-06 16:01:29 +02:00
Michael Schroeder
312a1d5c33 Merge pull request #444 from jrohel/fix/resources_in_xxopen
Fix: lzopen, zstdopen, zchunkopen
2021-04-06 15:54:16 +02:00
Jaroslav Rohel
725778574d 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.)
2021-04-06 10:16:09 +02:00
Jaroslav Rohel
ee8b8b9d72 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.
2021-04-06 10:16:09 +02:00
Jaroslav Rohel
6864aeffb0 Fix: Use "solv_free" for memory allocated by "solv_calloc" 2021-04-06 10:16:09 +02:00
Michael Schroeder
d52e359003 Change calloc/realloc calls to solv_calloc/solv_realloc
Spotted by Jaroslav Rohel, thanks!
2021-03-31 13:48:42 +02:00
Michael Schroeder
7c177b54c0 Merge pull request #443 from tl-hbk/fix_resolve_jobrules_segfault
Fix segfault in resolve_jobrules
2021-03-31 13:39:57 +02:00
Thomas Lam
0ecd4f3103 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
2021-03-30 05:36:40 -07:00
Michael Schroeder
3acd20fc94 tweak last commit 2021-03-29 15:07:55 +02:00
Michael Schroeder
866a32acb1 Merge pull request #442 from jrohel/fix/memory_leaks
Fix memory leaks
2021-03-29 15:06:44 +02:00
Jaroslav Rohel
71c6b26096 Fix memory leaks 2021-03-29 12:46:31 +02:00
Michael Schroeder
35e172e9fb Add changes, bump version to 0.7.18 0.7.18 2021-03-26 14:18:57 +01:00
Michael Schroeder
e1835983a5 Merge pull request #438 from tl-hbk/fix_align
Update long usage in regex polyfill
2021-03-19 16:06:54 +01:00
Thomas Lam
f330051f85 Update long usage in regex polyfill 2021-03-18 08:22:44 -05:00
Michael Schroeder
66411d94ad Merge pull request #414 from dthadi3/ppc64le
Travis-ci: added support for ppc64le
2021-03-18 13:16:28 +01:00
Michael Schroeder
7d6dc7ec14 Merge pull request #439 from kontura/memleak
Fix memory leak of solv->choicerules_info
2021-03-18 13:15:31 +01:00
Aleš Matěj
3be061efaa Remove bogus allocation of solv->choicerules_info
It was leaking memory.
2021-03-11 18:15:31 +01:00
Michael Schroeder
96c92ef3ee Merge pull request #436 from tl-hbk/fix_win32_regex
Fix regex bug on windows
2021-03-08 15:37:04 +01:00
Thomas Lam
4efd62c99f Fix regex bug on windows
a5aff1972c/include/alltypes.h.in (L10)
a5aff1972c/arch/x86_64/bits/alltypes.h.in (L1)
2021-03-08 08:07:33 -06:00
Michael Schroeder
ba171f10c7 Merge pull request #434 from tl-hbk/use_only_tar_bz2
Add flag to skip conda v2 packages when parsing conda repos
2021-03-02 14:47:37 +01:00
Thomas Lam
ed6fb6afb5 Update flag because first 8 bits are reserved 2021-03-01 10:16:42 -06:00
Thomas Lam
08983955af Add flag to skip conda v2 packages when parsing conda repos 2021-03-01 09:48:03 -06:00
Michael Schroeder
4bc791c0d2 Add changes, bump version to 0.7.17 0.7.17 2021-01-19 15:10:21 +01:00
Michael Schroeder
1f451b364a Tweak default/visible handling in comps parser 2021-01-19 14:58:25 +01:00
Michael Schroeder
6c7b9400f0 Merge pull request #409 from pkratoch/comps-parsing
Parsing comps - add default, langonly and parse boolean values
2021-01-19 14:39:37 +01:00
Michael Schroeder
0077ef29eb testcase_read: error out if repos are added or the system is changed too late
We must not add new solvables after the considered map was created, the solver
was created, or jobs were added. We may not changed the system after jobs have
been added.

(Jobs may point inside the whatproviedes array, so we must not invalidate this
area.)
2020-12-14 11:12:00 +01:00
Michael Schroeder
926244b99d Really add code to set dbpath in rpmdb2solv
Should have been in commit f74c5b79c2
2020-12-10 16:39:50 +01:00
Michael Schroeder
c78a330a27 Add _db_backend workaround for rpm-4.16.0
Rpm 4.16.0 cannot read the database if _db_config is not set.
2020-12-10 16:37:26 +01:00
Devendranath Thadi
d5b0473ca6 Travis-ci: added support for ppc64le 2020-11-24 08:22:20 +00:00
Michael Schroeder
f74c5b79c2 Support to set the dbpath in rpmdb2solv 2020-11-18 13:13:08 +01:00
Michael Schroeder
04d4d036b2 Make use of the %_dbpath macro if it is set 2020-11-18 13:09:36 +01:00
Pavla Kratochvilova
3f6bee638b Parse boolean values in comps xml
Before this change, the resulting value was true if the attribute was
present, false otherwise. After this change, the resulting value is
true if the attribute value is "true", false if "false" and default
value otherwise. This is the same how libcomps parses the comps xml.
2020-11-18 08:05:30 +01:00
Michael Schroeder
e258226c24 Properly escape preprocessor directives
Otherwise swig will process them instead of the compiler

Should have been in commit 170f8550b8
2020-11-16 15:11:14 +01:00
Michael Schroeder
170f8550b8 Use PyBytes_AsStringAndSize() instead of PyObject_AsReadBuffer() for python3
PyObject_AsReadBuffer was deprecated since python-3.0 and has
now been removed in python-3.10.

Fixes issue #410
2020-11-16 13:45:13 +01:00
Michael Schroeder
958c8396ad Further extend choicerule filtering check
Also add testcases. Fixes issue #406.

This is getting quite complicated...
2020-11-13 15:58:51 +01:00
Pavla Kratochvilova
148169b2ba Add support for default and langonly in comps xml 2020-11-12 08:47:43 +01:00
Michael Schroeder
054818cddc Merge pull request #402 from kontura/collection_o
Updateinfo metadata with multiple collections in a single pkglist (using only ids)
2020-11-06 11:59:44 +01:00
Michael Schroeder
5bd0f26e12 repo_write: fix handling of nested flexarray
Fixes issue #402
2020-11-06 10:25:57 +01:00
Michael Schroeder
7046fb0049 Add changes, bump version to 0.7.16 0.7.16 2020-10-20 12:07:03 +02:00
Michael Schroeder
f0838e3074 Do not ask the namespace callback for splitprovides when writing a testcase 2020-10-20 11:57:20 +02:00
Michael Schroeder
11c05b7c10 Fix add_complex_recommends() selecting conflicted packages in rare cases
Installing a recommended package can lead to a different recommended
package becoming confliced, so we have to re-check the candidates.

Fixes issue #399
2020-10-19 13:09:33 +02:00
Michael Schroeder
a273ff91ca Add testcase for better choicerule creation 2020-10-06 13:43:39 +02:00
Michael Schroeder
894382f0c4 Only do extra choicerule checking for newest packages
For old versions we prefer the choicerule so that we do
not switch to different providers instead of updating
the package.
2020-10-06 13:29:12 +02:00
Michael Schroeder
fe06d76ea4 Refactor solver_addchoicerules function
Split choicerule_find_installed() from the code so that
it can be reused in the next commit.
2020-10-06 13:27:28 +02:00
Michael Schroeder
e6419af8c4 Add a changes entry for the last commit 2020-10-05 11:08:34 +00:00