]>
git.ipfire.org Git - thirdparty/libsolv.git/log
Jaroslav Rohel [Tue, 11 Dec 2018 09:14:04 +0000 (10:14 +0100)]
Fix: Memory leaks
Jaroslav Rohel [Tue, 11 Dec 2018 08:50:06 +0000 (09:50 +0100)]
Fix: Add va_end() before return
The va_end() performs cleanup.
If va_end() is not called before a function that calls va_start() returns,
the behavior is undefined.
Jaroslav Rohel [Fri, 7 Dec 2018 06:05:10 +0000 (07:05 +0100)]
Fix: Dereference of null pointer
Michael Schroeder [Mon, 10 Dec 2018 14:05:39 +0000 (15:05 +0100)]
Do favor evaluation before pruning
This allows to support favoring single packages. As a side effect,
we'll have the best version displayed as alternative.
This changes the code to use a favor id for every solvable, which
means that it uses quite a bit of memory but makes the code much
easier and faster.
Michael Schroeder [Fri, 7 Dec 2018 14:17:15 +0000 (15:17 +0100)]
Add changes, bump version to 0.7.2
Michael Schroeder [Fri, 7 Dec 2018 14:05:11 +0000 (15:05 +0100)]
Get rid of the solve_helper function
We now use a special typemap to convert an array of Job objects
into a queue. (We already did that for tcl.)
Also generalize the DepId array code, we can now easily support
other dual types.
Michael Schroeder [Fri, 7 Dec 2018 14:03:14 +0000 (15:03 +0100)]
tclsolv: Adapt to Selection-flags change
Should have been in commit
c6b300573f9974706db9dfd061b6e6c5b0e81bf8
Michael Schroeder [Thu, 6 Dec 2018 13:42:01 +0000 (14:42 +0100)]
Docu tweaks
Michael Schroeder [Fri, 30 Nov 2018 15:16:51 +0000 (16:16 +0100)]
Tweak README
Michael Schroeder [Fri, 30 Nov 2018 14:05:33 +0000 (15:05 +0100)]
Do not autouninstall packages because of forcebest updates
Michael Schroeder [Fri, 30 Nov 2018 13:35:16 +0000 (14:35 +0100)]
Note to self: do not commit unfinished test cases...
Michael Schroeder [Fri, 30 Nov 2018 13:28:59 +0000 (14:28 +0100)]
Do not auto-erase disabled packages
Michael Schroeder [Mon, 26 Nov 2018 13:20:16 +0000 (14:20 +0100)]
Switch order of tilde and caret check in evr.c
Tilde must come before caret, so that 1.0~1 < 1.0^1
Also add this to the testcase.
Michael Schroeder [Mon, 26 Nov 2018 11:57:48 +0000 (12:57 +0100)]
Also look at recommends in only_namespace_recommended mode
We cheat by just checking if the dependency contains a namespace
relation. This is not 100% correct for complex dependencies where
we have multiple blocks after normalsation. But doing it right
is a lot of effort and there should be no difference in practice.
Michael Schroeder [Mon, 26 Nov 2018 11:55:20 +0000 (12:55 +0100)]
Enable support for new rpm's caret comparison
And add a testcase.
Michael Schroeder [Fri, 23 Nov 2018 13:19:16 +0000 (14:19 +0100)]
Add a small json parser
It's always good to have a json parser...
Michael Schroeder [Thu, 22 Nov 2018 15:18:56 +0000 (16:18 +0100)]
Add experimental SOLVER_FLAG_ONLY_NAMESPACE_RECOMMENDED flag
This limits the recommends/supplements to namespace dependencies.
Michael Schroeder [Thu, 22 Nov 2018 12:28:38 +0000 (13:28 +0100)]
Fix last commit. Oops.
Michael Schroeder [Thu, 22 Nov 2018 11:53:20 +0000 (12:53 +0100)]
Get rid of the xmlparser's error callback
It's much simpler to just return an error from the parse
call.
Michael Schroeder [Thu, 22 Nov 2018 11:52:15 +0000 (12:52 +0100)]
Add a solvable_free() inline helper function
Michael Schroeder [Thu, 22 Nov 2018 11:04:45 +0000 (12:04 +0100)]
Allow arch == NULL packages if arch testing is disabled
Michael Schroeder [Thu, 22 Nov 2018 11:02:00 +0000 (12:02 +0100)]
Fix off-by-one error in the "oneof" parsing code
Fixes issue#289
Michael Schroeder [Wed, 21 Nov 2018 13:15:34 +0000 (14:15 +0100)]
Support caret in rpm's EVR comparison
Currently only active if RPM_CARET_DEPS is defined, so that Igor
can do some testing.
Michael Schroeder [Wed, 14 Nov 2018 15:39:36 +0000 (16:39 +0100)]
bindings: implement set/get_considered_list
This is just a first version to play with. It's based
on pull request #288 from milan. Thanks!
Michael Schroeder [Wed, 31 Oct 2018 12:52:19 +0000 (13:52 +0100)]
Add changes, bump version to 0.7.1
Michael Schroeder [Wed, 31 Oct 2018 12:46:04 +0000 (13:46 +0100)]
repo_autopatten: also copy the category from the solvable defining the pattern
This makes it possible to have the (translated) categories in susedata.xml
instead of getting them from the package provides.
Michael Schroeder [Wed, 31 Oct 2018 12:02:28 +0000 (13:02 +0100)]
Fix off-by-one error in relation writing code
This tended to mess up the first relation in the solv file.
Counting is hard sometimes...
Michael Schroeder [Mon, 29 Oct 2018 08:47:08 +0000 (08:47 +0000)]
fix
Michael Schroeder [Mon, 29 Oct 2018 08:46:15 +0000 (08:46 +0000)]
Format a bit
Michael Schroeder [Wed, 24 Oct 2018 08:51:19 +0000 (10:51 +0200)]
Add changes, bump version to 0.7.0
Michael Schroeder [Wed, 24 Oct 2018 08:41:57 +0000 (10:41 +0200)]
Oops, bring back repo_write_filtered and repodata_write_filtered
They are deprectaed, but old code may still use them for now.
Michael Schroeder [Wed, 24 Oct 2018 08:28:31 +0000 (10:28 +0200)]
Adapt documentation to the last change.
Michael Schroeder [Wed, 24 Oct 2018 08:23:37 +0000 (10:23 +0200)]
Bindings: make Selection-flags an attribute
Incompatible API change! I hope this doesn't bite too many
bindings users. But better late than never, having a flags()
function does not make much sense.
Michael Schroeder [Wed, 24 Oct 2018 08:21:18 +0000 (10:21 +0200)]
Always set the filelisttype when creating a filelist stub
We used to do this only if there was a filtered filelist, but that
leads to problems if the filtered filelist is not in the same repodata
as the extension list.
Michael Schroeder [Mon, 22 Oct 2018 13:40:29 +0000 (15:40 +0200)]
Merge pull request #260 from berolinux/armv8
Add armv8 (32-bit mode of aarch64 CPUs)
Michael Schroeder [Mon, 22 Oct 2018 13:35:43 +0000 (15:35 +0200)]
Fix reserved identifier violation
See issue#104. We now prefix with "s_" instead of just "_".
Michael Schroeder [Mon, 22 Oct 2018 13:18:54 +0000 (15:18 +0200)]
Small cleanups
Michael Schroeder [Mon, 22 Oct 2018 12:46:17 +0000 (14:46 +0200)]
Incompatible ABI change: change transaction_calc_installsizechange from int to long long
Michael Schroeder [Mon, 22 Oct 2018 12:38:13 +0000 (14:38 +0200)]
Incompatible ABI change: change pool_calc_installsizechange and solvable_lookup_sizek from int to long long
Michael Schroeder [Mon, 22 Oct 2018 09:13:46 +0000 (11:13 +0200)]
Incompatible ABI change: change diskusage from int to long long
The diskusage is in kilobytes anyway, but this should make things
more future proof.
Igor Gnatenko [Mon, 8 Oct 2018 12:31:04 +0000 (14:31 +0200)]
Merge pull request #282 from jdieter/fix-parens
Add missing parenthesis
Jonathan Dieter [Mon, 8 Oct 2018 11:55:56 +0000 (12:55 +0100)]
Add missing parenthesis
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Michael Schroeder [Mon, 8 Oct 2018 11:24:57 +0000 (13:24 +0200)]
Refactor selection code
Michael Schroeder [Mon, 8 Oct 2018 11:23:36 +0000 (13:23 +0200)]
Test selection_matchsolvable
Michael Schroeder [Mon, 8 Oct 2018 11:21:51 +0000 (13:21 +0200)]
Split away solvable_matchessolvable_int function
To be used in the selection code as well.
Michael Schroeder [Mon, 8 Oct 2018 09:55:13 +0000 (11:55 +0200)]
Tweak system zchunk code
- rename USE_SYSTEM_ZCHUNK to WITH_SYSTEM_ZCHUNK
- fix file descriptor leak
- fix memory leaks
Michael Schroeder [Mon, 8 Oct 2018 09:01:14 +0000 (11:01 +0200)]
Merge pull request #270 from jdieter/zchunk
Add zchunk support
Michael Schroeder [Fri, 5 Oct 2018 12:41:20 +0000 (14:41 +0200)]
Add selection_make_matchsolvable and selection_make_matchsolvablelist
This is like pool_whatmatchessolvable, but works on a selection.
The advantage is that it supports filtering.
Michael Schroeder [Fri, 5 Oct 2018 11:58:56 +0000 (13:58 +0200)]
Improve alldeps code in example solver
Michael Schroeder [Thu, 4 Oct 2018 15:22:43 +0000 (17:22 +0200)]
Add pool_whatmatchessolvable() function to match against the provides of a solvable
Michael Schroeder [Wed, 3 Oct 2018 07:29:55 +0000 (09:29 +0200)]
Clean up filelist mode code
Michael Schroeder [Mon, 1 Oct 2018 21:51:44 +0000 (23:51 +0200)]
Move key mapping after key pruning
That way we'll not pollute the spool so much. The
downside is that we need to have some extra room on
the needid array for the keys.
Michael Schroeder [Sat, 29 Sep 2018 21:39:41 +0000 (23:39 +0200)]
Improve main schema generation
Now less complex and may result in a smaller solv file,
Michael Schroeder [Sat, 29 Sep 2018 21:18:21 +0000 (23:18 +0200)]
Improve handling of dirs in repo_write
Again, what was I thinking?
Michael Schroeder [Sat, 29 Sep 2018 07:20:48 +0000 (09:20 +0200)]
Drop support for REPOKEY_TYPE_U32
Six years ago we used it for the rpmdbid of installed packages.
See commit
d2b47004c22a7df3b92eaa8cbbb3a42ea32d047e
Michael Schroeder [Sat, 29 Sep 2018 07:13:40 +0000 (09:13 +0200)]
Improve handling of relations in repo_write
The old way was way to complex. What was I thinking?
Jonathan Dieter [Mon, 28 May 2018 18:52:31 +0000 (21:52 +0300)]
Add system zchunk support
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Michael Schroeder [Fri, 28 Sep 2018 12:48:14 +0000 (14:48 +0200)]
Make sure that targeted updates don't do reinstalls
We already had code in add_update_target() to do this, but it did
not cover the multiversion case where more than one package with
the same name is installed.
Michael Schroeder [Mon, 24 Sep 2018 11:04:50 +0000 (13:04 +0200)]
Improve handing over of the parant kv in subarray searches
We now pass it disguised as keyskip.
Michael Schroeder [Mon, 24 Sep 2018 11:03:16 +0000 (13:03 +0200)]
Change data_fetch so that it always returns the first entry
It did something different for fix/flexarrays.
Michael Schroeder [Mon, 24 Sep 2018 10:59:20 +0000 (12:59 +0200)]
Allow writing of repodatas in state LOADING
Broken with commit
241123391fdbd0fa4b38b2a30b78e85de9c9fd5d
Michael Schroeder [Fri, 21 Sep 2018 13:35:54 +0000 (15:35 +0200)]
Generalize uninternalized lookups
We now have the generic repodata_lookup_kv_uninternalized and
repodata_search_uninternalized to access uninternalized data.
Drop the old interface, the functions were only used in some
metadata parsers. So it's an API change but nobody should notice.
Michael Schroeder [Fri, 21 Sep 2018 13:31:30 +0000 (15:31 +0200)]
Fix share handling in repo2solv
We only search the uninternalized data for the repodata we're
extending, so we need to internalize the data before adding
new repodata areas.
Michael Schroeder [Fri, 21 Sep 2018 13:29:18 +0000 (15:29 +0200)]
Fix shared handling for 'susetags2solv -d'
We need to record the share data, otherwise we miss the share
information when extending the packages.
Michael Schroeder [Wed, 19 Sep 2018 16:20:57 +0000 (18:20 +0200)]
Add some casts so that the C++ compiler does not complain
Michael Schroeder [Wed, 19 Sep 2018 12:06:50 +0000 (14:06 +0200)]
Change order of known ids a bit
INCOMPATIBLE ABI CHANGE
Michael Schroeder [Wed, 19 Sep 2018 11:56:44 +0000 (13:56 +0200)]
Drop internal data_skip_verify function
Nobody used it.
Michael Schroeder [Wed, 19 Sep 2018 11:54:53 +0000 (13:54 +0200)]
Support reading of TYPE_DELETED keys
Michael Schroeder [Wed, 19 Sep 2018 11:30:42 +0000 (13:30 +0200)]
Bring repodata_lookup_num in sync with repo_lookup_num
It used to return a boolean if the num was found and write
the num over a pointer. This was done because repo_lookup_num
needed to iterate over all repodatas and thus needed to know
if the keyname existed or not.
Nowadays we use repo_lookup_repodata_opt to find the correct
repodata, so we do no longer need the boolean return value.
So we can make repodata_lookup_num work like repo_lookup_num.
This is an INCOMPATIBLE API CHANGE but I'm pretty sure nobody
uses repodate_lookup_num, so this should not hurt anybody.
(You can use a call to repodata_lookup_type to check if the
repodata really contains the num in case the "notfound" value
is returned.)
Michael Schroeder [Wed, 19 Sep 2018 11:18:42 +0000 (13:18 +0200)]
Implement the REPOWRITER_KEEP_TYPE_DELETED flag
Michael Schroeder [Wed, 19 Sep 2018 10:34:12 +0000 (12:34 +0200)]
Drop undocumented old cruft from the tools code
This is mainly the -b and -n options, which were used to
test solv extension files in the long ago past.
Michael Schroeder [Wed, 19 Sep 2018 09:21:47 +0000 (11:21 +0200)]
Add new repowriter interface to write a solv file
This replaces the old write_filtered functions that could
not be extended easily. The old functions are deprecated, do
not use them in new code!
Michael Schroeder [Wed, 19 Sep 2018 08:16:41 +0000 (10:16 +0200)]
drop stuff from TODO list
Michael Schroeder [Tue, 18 Sep 2018 12:57:36 +0000 (14:57 +0200)]
repo_rpmdb: use new repodata_search_arrayelement method
Michael Schroeder [Tue, 18 Sep 2018 12:56:27 +0000 (14:56 +0200)]
Add repodata_search_arrayelement method
This searches an element of an array referenced by the kv.
Michael Schroeder [Tue, 18 Sep 2018 12:49:57 +0000 (14:49 +0200)]
Add repodata_translate_dir method
This translates a dir id from one repodata to another. Change
repo_rpmdb to use it when copying solvables.
Michael Schroeder [Tue, 18 Sep 2018 12:00:38 +0000 (14:00 +0200)]
repo_add_solv: check that arrays have incore storage
Also fix a tiny bug in the vdata handling.
Michael Schroeder [Tue, 18 Sep 2018 11:59:17 +0000 (13:59 +0200)]
data_fetch: set kv->entry to -1 in array case
Not that the code is used anywhere...
Michael Schroeder [Tue, 18 Sep 2018 11:58:22 +0000 (13:58 +0200)]
rpmdb2solv: support including the package changelogs
Michael Schroeder [Fri, 14 Sep 2018 13:41:49 +0000 (15:41 +0200)]
Second part of fixing the longstanding bug
Change dataiterator, repo_search, and repo_write so that it
uses only the value in the last repodata if multiple repodata
sections have an entry for the keyname.
We do this by first setting up a keyskip array that maps
keynames to a base + repodataid value. We skip a key
if the repodataid does not match the entry in the keyskip
array.
The base is used so that we do not have to clear the array
for the next search. Instead, the base is simply set to a
value greater than all the current entries.
WARNING: As this adds two new elements to the Dataiterator,
this is an INCOMPATIBLE ABI CHANGE. We'll use this to do
a couple of cleanup commits in the next days that have been
postponed until now. We'll bump the soname before doing the
next release.
Michael Schroeder [Fri, 14 Sep 2018 13:28:25 +0000 (15:28 +0200)]
Add missing repodata methods to bindings
lookup_id()
lookup_num()
lookup_void()
set_num()
set_void()
set_location()
unset()
Michael Schroeder [Mon, 10 Sep 2018 09:54:37 +0000 (11:54 +0200)]
Cosmetics: fix spaces
Michael Schroeder [Mon, 10 Sep 2018 09:53:22 +0000 (11:53 +0200)]
Rewrite addfileprovides
It should now mirror what repo_lookup_filelist_repodata does.
It should also be quite a bit faster than the old code.
Michael Schroeder [Mon, 10 Sep 2018 09:49:54 +0000 (11:49 +0200)]
With the new code SEARCH_COMPLETE_FILELIST is the default.
We may add a SEARCH_FILTERED_FILELIST flag in the future if
there is a use case.
Michael Schroeder [Mon, 10 Sep 2018 09:47:00 +0000 (11:47 +0200)]
Add an internal repodata_lookup_packed_dirstrarray function
This is faster than using repo_search to iterate over the
filelist. We will use it in the new addfileprovides code.
Michael Schroeder [Mon, 10 Sep 2018 09:44:52 +0000 (11:44 +0200)]
Support custom filelist filters.
REPOSITORY_FILTEREDFILELIST can now be an idarray where each
element is a glob pattern.
Michael Schroeder [Mon, 10 Sep 2018 09:38:19 +0000 (11:38 +0200)]
Change lookup/search code that it returns the match from the last repodata
This is the first part of fixing a longstanding bug. This fixes
the lookup cases and the case where a keyname is provided in the
search/iterator.
We do this by adding a repo_lookup_repodata function that returns the
last repodata that has the specified keyname.
There is also a repo_lookup_repodata_opt function that may return
a repodata that does not contain the keyname instead of NULL. This
is a bit faster if you need to do a lookup anyway.
We also now have a repo_lookup_filelist_repodata that contains all
the logic to deal with filtered filelists.
Michael Schroeder [Mon, 10 Sep 2018 09:32:39 +0000 (11:32 +0200)]
repo_search: stringify filenames if requested
This brings repo_search in sync with what the data iterator
code does.
Michael Schroeder [Mon, 10 Sep 2018 09:26:05 +0000 (11:26 +0200)]
Add REPOSITORY_FILTEREDFILELIST id and filelist type
REPOSITORY_FILTEREDFILELIST is used to mark that the filelist
in the repodata is filtered with some filter.
The commit also adds a filelisttype element to the repodata
and sets it to filtered if REPOSITORY_FILTEREDFILELIST is set.
It also sets the filelisttype to extension if the repodata
has a filelist and was generated by extending solvables.
We'll use the filelisttype later to decide if we should use
the filtered filelist when searching for files.
Michael Schroeder [Mon, 10 Sep 2018 09:03:52 +0000 (11:03 +0200)]
Cosmetics: rename repodata_load_stub to repodata_stub_loader
Also keep the callback when loading a stub with repo_add_solv,
as some tools use it as indicator if the repodata was a stub.
Michael Schroeder [Mon, 10 Sep 2018 08:48:30 +0000 (10:48 +0200)]
Make repo_matchvalue static and remove it from list of exported symbols
It was never declared in a header file. Furthermore it needs
an internal struct definition to work, so nobody from outside
can use it anyway.
Michael Schroeder [Mon, 10 Sep 2018 08:42:59 +0000 (10:42 +0200)]
Move repodata_filelistfilter_matches into filelistfilter.c
We'll later extend this to support custom filelist filters.
Michael Schroeder [Mon, 10 Sep 2018 08:34:45 +0000 (10:34 +0200)]
Split away repodata_load
This can be used to force loading of a stub repodata.
Michael Schroeder [Fri, 7 Sep 2018 14:29:29 +0000 (16:29 +0200)]
Cosmetics: save some space
Michael Schroeder [Fri, 7 Sep 2018 14:28:25 +0000 (16:28 +0200)]
Work around bogus uninitialized warning from gcc
Michael Schroeder [Fri, 7 Sep 2018 14:26:37 +0000 (16:26 +0200)]
Also add autopatterns for the system repo
Should have been in commit
276e7586cce0535c194336cd2a3bac9d4f5805e1
Michael Andres [Thu, 23 Aug 2018 10:50:44 +0000 (12:50 +0200)]
libzstd is available on leap15 but not on sle15
Denis Ollier [Thu, 9 Aug 2018 21:05:04 +0000 (23:05 +0200)]
Fix out of bounds compilation warning
When compiling with -D_FORTIFY_SOURCE=2, gcc raises the following
warning:
In file included from /usr/include/string.h:494,
from /build/libsolv/src/libsolv-0.6.35/src/policy.c:16:
In function ‘memcpy’,
inlined from ‘urpm_reorder.isra.18’ at /build/libsolv/src/libsolv-0.6.35/src/policy.c:1239:9:
/usr/include/bits/string_fortified.h:34:10: warning: ‘__builtin_memcpy’ forming offset 8 is out of the bounds [0, 7] [-Warray-bounds]
return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Culprit code is:
memcpy(kn, "kernel", 8);
memcpy(kn + 6, flavor, release - flavor + 1);
The first memcpy copies 8 bytes whereas the string "kernel" as only 7
bytes. It does not have serious consequence since the second memcpy
overwrites the unwanted byte. Anyway, it is better to fix it.
Michael Schroeder [Thu, 9 Aug 2018 15:19:37 +0000 (17:19 +0200)]
Add changes, bump version to 0.6.35
Michael Schroeder [Wed, 25 Jul 2018 10:51:22 +0000 (12:51 +0200)]
Fix indent