Pekka Vuorela [Mon, 21 Jan 2019 14:45:04 +0000 (16:45 +0200)]
Fix repo2solv to work with Busybox find tool
Busybox find got quite confused by "." as arg0. Added a new instance of
dot as first real parameter as I could assume that being the original
intention.
Jaroslav Rohel [Tue, 11 Dec 2018 09:27:15 +0000 (10:27 +0100)]
Fix: testsolv segfaults
ERROR: AddressSanitizer: SEGV on unknown address 0x0000000002f0 (pc 0x7f31501d3bd2 bp 0x7ffcfe4d4a50 sp 0x7ffcfe4d4a30 T0)
0 0x7f31501d3bd1 in pool_whatprovides /home/company/real_sanitize/libsolv-master/src/pool.h:331
1 0x7f31501d895e in testcase_str2solvid /home/company/real_sanitize/libsolv-master/ext/testcase.c:793
2 0x7f31501e8388 in testcase_read /home/company/real_sanitize/libsolv-master/ext/testcase.c:2807
3 0x402aa5 in main /home/company/real_sanitize/libsolv-master/tools/testsolv.c:148
4 0x7f314fa8da3f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x20a3f)
5 0x401bb8 in _start (/home/company/real_sanitize/libsolv-master/build/install/bin/testsolv+0x401bb8)
ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7f5af9e7815f bp 0x7ffc4c843a40 sp 0x7ffc4c8436c0 T0)
0 0x7f5af9e7815e in testcase_read /home/company/real_sanitize/libsolv-master/ext/testcase.c:2799
1 0x402aa5 in main /home/company/real_sanitize/libsolv-master/tools/testsolv.c:148
2 0x7f5af971da3f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x20a3f)
3 0x401bb8 in _start (/home/company/real_sanitize/libsolv-master/build/install/bin/testsolv+0x401bb8)
Jaroslav Rohel [Tue, 11 Dec 2018 09:22:09 +0000 (10:22 +0100)]
Fix: testsolv segfault
ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7fab0e11bf2b bp 0x7ffdfc044b70 sp 0x7ffdfc044a90 T0)
0 0x7fab0e11bf2a in testcase_str2dep_complex /home/company/real_sanitize/libsolv-master/ext/testcase.c:577
1 0x7fab0e11c80f in testcase_str2dep /home/company/real_sanitize/libsolv-master/ext/testcase.c:656
2 0x7fab0e12e64a in testcase_read /home/company/real_sanitize/libsolv-master/ext/testcase.c:2952
3 0x402aa5 in main /home/company/real_sanitize/libsolv-master/tools/testsolv.c:148
4 0x7fab0d9d2a3f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x20a3f)
5 0x401bb8 in _start (/home/company/real_sanitize/libsolv-master/build/install/bin/testsolv+0x401bb8)
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.
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.
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.
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.
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.
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.)
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.