]> git.ipfire.org Git - thirdparty/libsolv.git/log
thirdparty/libsolv.git
6 days agoDocument SOLVER_FLAG_STRONG_RECOMMENDS flag 596/head
Marek Blaha [Tue, 29 Jul 2025 12:37:49 +0000 (14:37 +0200)] 
Document SOLVER_FLAG_STRONG_RECOMMENDS flag

6 days agoFix potential access of freed mem in the genid testcase
Michael Schroeder [Tue, 29 Jul 2025 08:02:04 +0000 (10:02 +0200)] 
Fix potential access of freed mem in the genid testcase

10 days agosolver_addbestrules: recalculate pointer to current rule after adding a new rule
Michael Schroeder [Fri, 25 Jul 2025 09:08:59 +0000 (11:08 +0200)] 
solver_addbestrules: recalculate pointer to current rule after adding a new rule

The code adds new rules in a FOR_RULELITERALS loop. The iterator needs
to access elements of the rule it iterates over, so if we add a new
rule in the loop body, we have to make sure that the pointer to the
current rule stays valid.

Fixes issue #594

11 days agoMerge pull request #593 from Redbeanw44602/master
Michael Schroeder [Thu, 24 Jul 2025 13:04:47 +0000 (15:04 +0200)] 
Merge pull request #593 from Redbeanw44602/master

Fix build on win32 & mingw.

11 days agofix compile on mingw-w64. 593/head
Redbeanw44602 [Thu, 24 Jul 2025 05:43:26 +0000 (13:43 +0800)] 
fix compile on mingw-w64.

11 days agofix msvc c2036.
Redbeanw44602 [Thu, 24 Jul 2025 05:42:07 +0000 (13:42 +0800)] 
fix msvc c2036.

4 weeks agoAdd changes, bump version to 0.7.34 0.7.34
Michael Schroeder [Mon, 7 Jul 2025 11:51:03 +0000 (13:51 +0200)] 
Add changes, bump version to 0.7.34

4 weeks agorepo_autopattern: support creation of obsoletes for product packages
Michael Schroeder [Mon, 7 Jul 2025 11:27:04 +0000 (13:27 +0200)] 
repo_autopattern: support creation of obsoletes for product packages

This adds support for provides of the type "product-obsoletes(name)".
We translate this to "Obsoletes: product:<name>" in the generated
product pseudo package.

We need this because people used "Obsoletes: product:name" in the
"release" package, but this is no longer allowed in newer rpm versions.
Besides, the obsoletes is kind of wrong in the "release" package
anyway, it belongs in the generated "product:" package.

2 months agoMerge pull request #591 from AntoinePrv/missing-headers
Michael Schroeder [Wed, 4 Jun 2025 15:13:53 +0000 (17:13 +0200)] 
Merge pull request #591 from AntoinePrv/missing-headers

Fix Unix header on Windows

2 months agoFix Unix header on Windows 591/head
AntoinePrv [Wed, 4 Jun 2025 12:55:53 +0000 (14:55 +0200)] 
Fix Unix header on Windows

2 months agoAdd changes, bump version to 0.7.33 0.7.33
Michael Schroeder [Tue, 3 Jun 2025 11:40:58 +0000 (13:40 +0200)] 
Add changes, bump version to 0.7.33

2 months agoSupport orderwithrequires dependencies in susedata.xml
Michael Schroeder [Tue, 3 Jun 2025 11:20:20 +0000 (13:20 +0200)] 
Support orderwithrequires dependencies in susedata.xml

2 months agorepo parsers: use strtoull instead of atoi to parse the time
Michael Schroeder [Tue, 3 Jun 2025 09:47:54 +0000 (11:47 +0200)] 
repo parsers: use strtoull instead of atoi to parse the time

2 months agoTransaction ordering: Allow more uninst->uninst edges
Michael Schroeder [Mon, 2 Jun 2025 09:30:59 +0000 (11:30 +0200)] 
Transaction ordering: Allow more uninst->uninst edges

Only skip uninst->uninst edges if both elements are build to
inst elements.

2 months agoMerge pull request #590 from gruenich/feature/cppcheck-warnings
Michael Schroeder [Fri, 16 May 2025 08:19:15 +0000 (10:19 +0200)] 
Merge pull request #590 from gruenich/feature/cppcheck-warnings

Simlify some if conditions to fix Cppcheck warnings

2 months agopool.c: Remove identical if condition 590/head
Christoph Grüninger [Wed, 14 May 2025 19:31:56 +0000 (21:31 +0200)] 
pool.c: Remove identical if condition

It is always true.
Found by Cppcheck (identicalInnerCondition).

2 months agoorder.c: Combine if's with identical conditions
Christoph Grüninger [Wed, 14 May 2025 19:24:05 +0000 (21:24 +0200)] 
order.c: Combine if's with identical conditions

Found by Cppcheck (duplicateCondition).

2 months agorules.c: Simplify if condition
Christoph Grüninger [Wed, 14 May 2025 19:21:31 +0000 (21:21 +0200)] 
rules.c: Simplify if condition

rid <=0 is checked two lines before.
Found by Cppcheck (knownConditionTrueFalse).

2 months agodecision.c: Simplify else condition
Christoph Grüninger [Wed, 14 May 2025 19:16:19 +0000 (21:16 +0200)] 
decision.c: Simplify else condition

Found by Cppcheck: "Expression is always true because
'else if' condition is opposite to previous condition
at line 608." (multiCondition)

2 months agoMerge pull request #589 from gruenich/feature/implicit-function-declaration
Michael Schroeder [Wed, 14 May 2025 12:06:52 +0000 (14:06 +0200)] 
Merge pull request #589 from gruenich/feature/implicit-function-declaration

Add includes for getopt() and strcasecmp()

2 months agoMerge pull request #588 from gruenich/feature/decision-return-void
Michael Schroeder [Wed, 14 May 2025 12:06:11 +0000 (14:06 +0200)] 
Merge pull request #588 from gruenich/feature/decision-return-void

decision.c: void function should not return anything

2 months agoAdd includes for getopt() and strcasecmp() 589/head
Christoph Grüninger [Tue, 13 May 2025 17:34:04 +0000 (19:34 +0200)] 
Add includes for getopt() and strcasecmp()

Found by GCC in C23 mode (implicit-function-declaration).

2 months agodecision.c: void function should not return anything 588/head
Christoph Grüninger [Tue, 13 May 2025 17:11:35 +0000 (19:11 +0200)] 
decision.c: void function should not return anything

Do not call to solver_get_proof as part of return statement

Found by GCC ("ISO C forbids ‘return’ with expression, in
function returning void", pedantic).

3 months agoAdd apk2solv man page
Michael Schroeder [Tue, 15 Apr 2025 11:11:30 +0000 (13:11 +0200)] 
Add apk2solv man page

3 months agoAdd regression test for last commit
Michael Schroeder [Tue, 15 Apr 2025 10:52:47 +0000 (12:52 +0200)] 
Add regression test for last commit

3 months agoMerge pull request #584 from AntoinePrv/missing-headers
Michael Schroeder [Mon, 14 Apr 2025 13:18:14 +0000 (15:18 +0200)] 
Merge pull request #584 from AntoinePrv/missing-headers

Add missing headers

3 months agoadd missing headers 584/head
AntoinePrv [Mon, 14 Apr 2025 12:15:53 +0000 (14:15 +0200)] 
add missing headers

3 months agoImplement color filtering when adding update targets
Michael Schroeder [Mon, 14 Apr 2025 12:14:59 +0000 (14:14 +0200)] 
Implement color filtering when adding update targets

The old code created update jobs spanning multiple architectures
even if "implicitobsoleteusescolors" was set.
Also add color filtering in replaces_installed_package, where it
seems to be also missing

Fixes issue #583.

3 months agorpms2solv: add -i option to include the pkgid
Michael Schroeder [Thu, 10 Apr 2025 13:43:09 +0000 (15:43 +0200)] 
rpms2solv: add -i option to include the pkgid

3 months agoUse the truncated sha256 sigtag if there is no header+payload md5
Michael Schroeder [Thu, 10 Apr 2025 13:40:59 +0000 (15:40 +0200)] 
Use the truncated sha256 sigtag if there is no header+payload md5

Rpmv6 will no longer have a header+payload digest.

4 months agoAdd changes, bump version to 0.7.32 0.7.32
Michael Schroeder [Thu, 3 Apr 2025 11:10:26 +0000 (13:10 +0200)] 
Add changes, bump version to 0.7.32

4 months agoAdd dataiterator_final_{solvable,repo} functions
Michael Schroeder [Thu, 3 Apr 2025 11:05:54 +0000 (13:05 +0200)] 
Add dataiterator_final_{solvable,repo} functions

Those are needed by libzypp. They tell the dataiterator that it
should stay in the solvable/repository.

4 months agoMerge pull request #578 from bmwiedemann/yastruby
Michael Schroeder [Thu, 3 Apr 2025 09:36:00 +0000 (11:36 +0200)] 
Merge pull request #578 from bmwiedemann/yastruby

Provide a symbol specific for the ruby-version

4 months agoFix typo that broke restoration of CMAKE_FIND_LIBRARY_SUFFIXES
Michael Schroeder [Wed, 2 Apr 2025 14:01:15 +0000 (16:01 +0200)] 
Fix typo that broke restoration of CMAKE_FIND_LIBRARY_SUFFIXES

4 months agoProvide a symbol specific for the ruby-version 578/head
Bernhard M. Wiedemann [Wed, 15 Jan 2025 09:21:25 +0000 (10:21 +0100)] 
Provide a symbol specific for the ruby-version

so that yast does not break across updates (boo#1235598)

4 months agoSEARCH_THISSOLVID is in use by libzypp
Michael Schroeder [Mon, 31 Mar 2025 14:21:20 +0000 (16:21 +0200)] 
SEARCH_THISSOLVID is in use by libzypp

4 months agoHide a couple of internal definitions
Michael Schroeder [Mon, 31 Mar 2025 13:59:57 +0000 (15:59 +0200)] 
Hide a couple of internal definitions

4 months agoMerge pull request #576 from gruenich/feature/drop-travis-ci
Michael Schroeder [Fri, 28 Mar 2025 13:24:22 +0000 (14:24 +0100)] 
Merge pull request #576 from gruenich/feature/drop-travis-ci

Remove file for travis CI

4 months agoMerge pull request #577 from gruenich/feature/github-action-checkout-v4
Michael Schroeder [Fri, 28 Mar 2025 13:21:41 +0000 (14:21 +0100)] 
Merge pull request #577 from gruenich/feature/github-action-checkout-v4

[ci] Update actions/checkout to version 4

4 months agoRemove file for travis CI 576/head
Christoph Grüninger [Sat, 21 Dec 2024 13:49:46 +0000 (14:49 +0100)] 
Remove file for travis CI

This should be no longer used for a long time

4 months agoChange the package to build both static and dynamic
Michael Schroeder [Thu, 20 Mar 2025 14:37:10 +0000 (15:37 +0100)] 
Change the package to build both static and dynamic

This is done for suse_version >= 1600, i.e. openSUSE and SLES16.
There will be a new subpackage called libsolv-devel-static.

4 months agoapk: tweak apk_add_hdrid a bit
Michael Schroeder [Thu, 20 Mar 2025 14:11:19 +0000 (15:11 +0100)] 
apk: tweak apk_add_hdrid a bit

Make sure that the checksum starts with 'Q'.

4 months agoAllow to link the tools/bindings against the static version of the libraries
Michael Schroeder [Thu, 20 Mar 2025 10:06:01 +0000 (11:06 +0100)] 
Allow to link the tools/bindings against the static version of the libraries

This is only relevant if both the static and dynamic versions are
built.

4 months agorepo_apkv3: be more correct in add_add_idb_pkg
Michael Schroeder [Thu, 20 Mar 2025 10:04:23 +0000 (11:04 +0100)] 
repo_apkv3: be more correct in add_add_idb_pkg

Should not matter because the adb blocks are always fitting
in 30 bits.

4 months agoSplit off common apk_fillbuf function
Michael Schroeder [Thu, 20 Mar 2025 10:03:41 +0000 (11:03 +0100)] 
Split off common apk_fillbuf function

4 months agoRemove CMAKE_MAJOR_VERSION comparison
Michael Schroeder [Wed, 19 Mar 2025 14:26:20 +0000 (15:26 +0100)] 
Remove CMAKE_MAJOR_VERSION comparison

4 months agoMerge pull request #581 from ppisar/cmake4
Michael Schroeder [Wed, 19 Mar 2025 14:23:16 +0000 (15:23 +0100)] 
Merge pull request #581 from ppisar/cmake4

Increase CMake version to 3.5

5 months agoIncrease CMake version to 3.5 581/head
Petr Písař [Tue, 4 Mar 2025 08:02:22 +0000 (09:02 +0100)] 
Increase CMake version to 3.5

CMake 4.0.0 removed a support for CMake scripts older than 3.5 and a build
with CMake 4.0.0-rc2 fails like this:

    $ /usr/bin/cmake -S . -B redhat-linux-build
    CMake Warning (dev) at CMakeLists.txt:1 (PROJECT):
      cmake_minimum_required() should be called prior to this top-level project()
      call.  Please see the cmake-commands(7) manual for usage documentation of
      both commands.
    This warning is for project developers.  Use -Wno-dev to suppress it.

    CMake Error at CMakeLists.txt:3 (CMAKE_MINIMUM_REQUIRED):
      Compatibility with CMake < 3.5 has been removed from CMake.

      Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
      to tell CMake that the project requires at least <min> but has been updated
      to work with policies introduced by <max> or earlier.

      Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.

    -- Configuring incomplete, errors occurred!

There seems to be no way of making the script working with all
versions. CMake 3.5 was relased in 2016.

This patch increases the minimal version to 3.5 and moves it to the top
of the script as it needs to be the very first thing of a script as
recommeded by cmake:

    CMake Warning (dev) at CMakeLists.txt:1 (PROJECT):
      cmake_minimum_required() should be called prior to this top-level project()
      call.  Please see the cmake-commands(7) manual for usage documentation of
      both commands.

I did not set a supported upper version of CMake since I guess
we do not want to update it with every new minor CMake release.

Other printed CMake warnings are not news are not addressed with
this patch.

5 months agoMerge pull request #580 from ppisar/c23
Michael Schroeder [Mon, 10 Feb 2025 09:56:31 +0000 (10:56 +0100)] 
Merge pull request #580 from ppisar/c23

Fix building in ISO C23

5 months agoFix building in ISO C23 580/head
Petr Písař [Fri, 7 Feb 2025 14:21:16 +0000 (15:21 +0100)] 
Fix building in ISO C23

ISO C23 added bool type as a keyword. It is the standard GCC 15 uses by default and
compilation of bindings/perl/solv_perl.c fails then:

    bindings/perl/solv_perl.c:1641:13: error: ‘bool’ cannot be defined via ‘typedef’
     1641 | typedef int bool;
  |             ^~~~
    /home/test/fedora/libsolv/libsolv-0.7.31-build/libsolv-0.7.31/redhat-linux-build/bindings/perl/solv_perl.c:1641:13: note: ‘bool’ is a keyword with ‘-std=c23’ onwards
    /home/test/fedora/libsolv/libsolv-0.7.31-build/libsolv-0.7.31/redhat-linux-build/bindings/perl/solv_perl.c:1641:1: warning: useless type name in empty declaration
     1641 | typedef int bool;
  | ^~~~~~~

The typedef comes from bindings/solv.i which attemps to supply it in case Swig
undefines it.

This patch fixes it by not defining it in case ISO C23 or newer is in
use. Keywords cannot be checked by a preprocessor, neither undefined
(by Swig).

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2340762

6 months ago[ci] Update actions/checkout to version 4 577/head
Christoph Grüninger [Sat, 21 Dec 2024 13:55:01 +0000 (14:55 +0100)] 
[ci] Update actions/checkout to version 4

6 months agoFix apkv3 dependency operator handling
Michael Schroeder [Mon, 20 Jan 2025 15:49:21 +0000 (16:49 +0100)] 
Fix apkv3 dependency operator handling

6 months agoAlso set SOLVABLE_DOWNLOADSIZE for apkv2 indexes
Michael Schroeder [Mon, 20 Jan 2025 15:47:10 +0000 (16:47 +0100)] 
Also set SOLVABLE_DOWNLOADSIZE for apkv2 indexes

6 months agoAdd missing solv_free in the adb_read_adb_blk error case
Michael Schroeder [Fri, 17 Jan 2025 13:12:15 +0000 (14:12 +0100)] 
Add missing solv_free in the adb_read_adb_blk error case

6 months agoAdd liblzma-dev to fix the CI build
Michael Schroeder [Fri, 17 Jan 2025 09:13:23 +0000 (10:13 +0100)] 
Add liblzma-dev to fix the CI build

6 months agoFix bit shift in adb_read_blk_header
Michael Schroeder [Thu, 16 Jan 2025 15:40:21 +0000 (16:40 +0100)] 
Fix bit shift in adb_read_blk_header

And also move it to the other file read functions.

6 months agoRename APK_ADD_INDEX to APK_ADD_INSTALLED_DB while we can
Michael Schroeder [Wed, 15 Jan 2025 10:53:17 +0000 (11:53 +0100)] 
Rename APK_ADD_INDEX to APK_ADD_INSTALLED_DB while we can

6 months agoImplement apkv3 support
Michael Schroeder [Wed, 15 Jan 2025 10:46:24 +0000 (11:46 +0100)] 
Implement apkv3 support

7 months agoAllow an empty index file in repo_add_apk_repo
Michael Schroeder [Wed, 18 Dec 2024 10:00:35 +0000 (11:00 +0100)] 
Allow an empty index file in repo_add_apk_repo

7 months agoFix repo_add_arch_repo return type
Michael Schroeder [Tue, 17 Dec 2024 11:15:54 +0000 (12:15 +0100)] 
Fix repo_add_arch_repo return type

7 months agoImplement decompression in repo_add_apk_repo()
Michael Schroeder [Tue, 17 Dec 2024 11:11:25 +0000 (12:11 +0100)] 
Implement decompression in repo_add_apk_repo()

We need this to support apkv3 index files.

8 months agoMake LIBSOLVEXT_FEATURE_APK available in solvversion.h
Michael Schroeder [Thu, 28 Nov 2024 13:21:43 +0000 (14:21 +0100)] 
Make LIBSOLVEXT_FEATURE_APK available in solvversion.h

8 months agoAdd apk.h. Not my day.
Michael Schroeder [Thu, 28 Nov 2024 13:13:13 +0000 (14:13 +0100)] 
Add apk.h. Not my day.

8 months agoAdd forgotten apk2solv.c file
Michael Schroeder [Thu, 28 Nov 2024 13:11:40 +0000 (14:11 +0100)] 
Add forgotten apk2solv.c file

8 months agoAdd a package/repo parser for apk
Michael Schroeder [Thu, 28 Nov 2024 12:47:31 +0000 (13:47 +0100)] 
Add a package/repo parser for apk

You need to configure with ENABLE_APK to get them.

Note that we currently only support the v2 format. We'll add
v3 support if somebody uses it in the future.

8 months agoAdd support for DISTTYPE_APK to the libsolv core
Michael Schroeder [Thu, 28 Nov 2024 12:31:02 +0000 (13:31 +0100)] 
Add support for DISTTYPE_APK to the libsolv core

This is mostly the apk version comparison. We also do not add
spaces around the comparison ops for apk and shorten =~ to ~.

This is currenly bould to MULTI_SEMANTICS as we do not have
an "alpine" target yet.

8 months agoMove tar handling from repo_arch into its own file
Michael Schroeder [Thu, 28 Nov 2024 12:08:39 +0000 (13:08 +0100)] 
Move tar handling from repo_arch into its own file

We'll need it for apk packages.

8 months agoFix repo_add_arch_local() declaration
Michael Schroeder [Mon, 25 Nov 2024 11:03:29 +0000 (12:03 +0100)] 
Fix repo_add_arch_local() declaration

8 months agoAdd changes, bump version to 0.7.31 0.7.31
Michael Schroeder [Tue, 12 Nov 2024 09:56:36 +0000 (10:56 +0100)] 
Add changes, bump version to 0.7.31

8 months agoUse the correct solvable id when checking the noarch map
Michael Schroeder [Tue, 12 Nov 2024 09:44:07 +0000 (10:44 +0100)] 
Use the correct solvable id when checking the noarch map

Fixes issue #574

10 months agoInit the whatprovides of new ids to an empty list for lazy file provides
Michael Schroeder [Wed, 25 Sep 2024 11:52:40 +0000 (13:52 +0200)] 
Init the whatprovides of new ids to an empty list for lazy file provides

Otherwise finding the provides will always search the file list.

10 months agoMake POOL_FLAG_ADDFILEPROVIDESFILTERED behaviour more standard
Michael Schroeder [Wed, 18 Sep 2024 12:33:20 +0000 (14:33 +0200)] 
Make POOL_FLAG_ADDFILEPROVIDESFILTERED behaviour more standard

Turning on POOL_FLAG_ADDFILEPROVIDESFILTERED made the lookup of
all file dependencies lazy, not only the ones required by some
dependency. This changes the way searching works and may also
slow down some use cases.

We now changed addfileprovides() to record the needed non-standard
file dependencies and only make those lazy in createwhatprovides().

10 months agoAdd rpm_query_idarray query function
Michael Schroeder [Mon, 16 Sep 2024 13:43:45 +0000 (15:43 +0200)] 
Add rpm_query_idarray query function

This is added to query the OrderWithRequires dependencies from
downloaded rpms.

Also refactor query code a bit.

10 months agoSupport orderwithrequires dependencies in testcases
Michael Schroeder [Mon, 16 Sep 2024 13:35:17 +0000 (15:35 +0200)] 
Support orderwithrequires dependencies in testcases

10 months agoSupport rpm's "orderwithrequires" dependency
Michael Schroeder [Thu, 12 Sep 2024 10:37:09 +0000 (12:37 +0200)] 
Support rpm's "orderwithrequires" dependency

Note that the rpmmd parser cannot set it as the xml schema
does not include this type of dependency.

12 months agoRefactor string pool merging in repo_solv
Michael Schroeder [Mon, 22 Jul 2024 11:47:47 +0000 (13:47 +0200)] 
Refactor string pool merging in repo_solv

Move merging code into strpool.c where it belongs. Also clean up
hashmask handling a bit.

12 months agoAdd changes, bump version to 0.7.30 0.7.30
Michael Schroeder [Thu, 11 Jul 2024 11:21:09 +0000 (13:21 +0200)] 
Add changes, bump version to 0.7.30

12 months agoMerge pull request #571 from ppisar/dump_genid_format_overflow
Michael Schroeder [Thu, 11 Jul 2024 08:12:36 +0000 (10:12 +0200)] 
Merge pull request #571 from ppisar/dump_genid_format_overflow

Fix a possible format overflow in dump_genid()

12 months agoFix a possible format overflow in dump_genid() 571/head
Petr Písař [Wed, 10 Jul 2024 14:54:56 +0000 (16:54 +0200)] 
Fix a possible format overflow in dump_genid()

GCC 14 called with CFLAGS='-O2 -Wformat-overflow' complains:

    /tmp/libsolv/ext/testcase.c: In function ‘dump_genid’:
    /tmp/libsolv/ext/testcase.c:1275:33: warning: ‘: genid ’ directive writing 8 bytes into a region of size between 3 and 12 [-Wformat-overflow=]
     1275 |       sprintf(cntbuf, "genid %2d: genid ", cnt++);
  |                                 ^~~~~~~~
    /tmp/libsolv/ext/testcase.c:1275:7: note: ‘sprintf’ output between 17 and 26 bytes into a destination of size 20
     1275 |       sprintf(cntbuf, "genid %2d: genid ", cnt++);
  |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /tmp/libsolv/ext/testcase.c:1270:33: warning: ‘: genid ’ directive writing 8 bytes into a region of size between 3 and 12 [-Wformat-overflow=]
     1270 |       sprintf(cntbuf, "genid %2d: genid ", cnt++);
  |                                 ^~~~~~~~
    /tmp/libsolv/ext/testcase.c:1270:7: note: ‘sprintf’ output between 17 and 26 bytes into a destination of size 20
     1270 |       sprintf(cntbuf, "genid %2d: genid ", cnt++);
  |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

That's indeed a bug: sprintf() writes into a 20-byte array cntbuf. cnt
is int, 32-bit long integer on x86_64 Linux platform. dump_genid()
starts with cnt = 1 and increases. It can go up to 2147483647 decimal
value, then wrap to -2147483648 decimal value.  That's up to 11 bytes
of the integer, plus 14 bytes of a static string, plus 1 byte of
a trailing '\0'. 26 bytes in total.

While it's improbable that cnt would amount that long number in real
life, it's better to be prepared for the worst. Also a benefit is that
static analyzers will be be content.

This patch increases cntbuf[] size to accomodate common 32-bit
ints. (Generic, albeit illegible, expression would be:

    cntbuf[((sizeof(cnt) * 8 - 1) * 3 / 10 + 1 + 1) + 14 + 1];

but I'm not sure that long expression is worth of it.)

12 months agoAdd new SOLVER_FLAG_FOCUS_NEW focus type
Michael Schroeder [Tue, 9 Jul 2024 11:06:16 +0000 (13:06 +0200)] 
Add new SOLVER_FLAG_FOCUS_NEW focus type

First resolve the given jobs, then the dependencies of the
resulting packages ignoreing the ones provided by currently
installed packages. After that resolve all already installed
packages. This is similar to SOLVER_FLAG_FOCUS_BEST but less
aggressive in updating packages.

Fixes issue #549

12 months agorepo2solv: no longer use "find" to find rpms
Michael Schroeder [Mon, 8 Jul 2024 10:27:35 +0000 (12:27 +0200)] 
repo2solv: no longer use "find" to find rpms

This commit implements the file tree work needed
for the "plaindir" format. Like with the "find" command,
we do not follow symlinks to directories in recursive
mode.

13 months agoAdd more changes
Michael Schroeder [Fri, 7 Jun 2024 13:31:18 +0000 (15:31 +0200)] 
Add more changes

13 months agoUse %version in the new conflict and add a changes entry
Michael Schroeder [Fri, 7 Jun 2024 09:34:15 +0000 (11:34 +0200)] 
Use %version in the new conflict and add a changes entry

13 months agoMerge pull request #565 from bmwiedemann/conflict
Michael Schroeder [Fri, 7 Jun 2024 09:31:45 +0000 (11:31 +0200)] 
Merge pull request #565 from bmwiedemann/conflict

Add a Conflicts in libsolv-tools-base

13 months agoAdd a Conflicts in libsolv-tools-base 565/head
Bernhard M. Wiedemann [Fri, 7 Jun 2024 08:24:45 +0000 (10:24 +0200)] 
Add a Conflicts in libsolv-tools-base

so this does not get installed in parallel with older versions
of libsolv-tools

14 months agobindings: fix return value of repodata.add_solv()
Michael Schroeder [Tue, 21 May 2024 11:43:32 +0000 (13:43 +0200)] 
bindings: fix return value of repodata.add_solv()

Found by Dante Grapiuna de Almeida, thanks!
Fixes #564

14 months agoAlso set errno for unsupported compressions in solv_xfopen_fd()
Michael Schroeder [Thu, 16 May 2024 13:46:23 +0000 (15:46 +0200)] 
Also set errno for unsupported compressions in solv_xfopen_fd()

14 months agoFix SHA-224 oid in solv_pgpvrfy
Michael Schroeder [Tue, 14 May 2024 10:01:52 +0000 (12:01 +0200)] 
Fix SHA-224 oid in solv_pgpvrfy

14 months agoMerge pull request #563 from ppisar/solv_xfopen_unsupported_error
Michael Schroeder [Thu, 16 May 2024 13:41:31 +0000 (15:41 +0200)] 
Merge pull request #563 from ppisar/solv_xfopen_unsupported_error

Report unsupported compression in solv_xfopen() with errno

14 months agoReport unsupported compression in solv_xfopen() with errno 563/head
Petr Písař [Mon, 13 May 2024 07:55:01 +0000 (09:55 +0200)] 
Report unsupported compression in solv_xfopen() with errno

If libsolv was built without Zstandard support and "primary.xml.zst"
was passed solv_xfopen(), solv_xfopen() returned 0 without setting
errno. A calling application could not distinguish an unsupported
compression format from other I/O errors.

This patch improves this situation by setting errno variable to an
appropriate value. The value macros are documented in POSIX 2017.

15 months agoAdd changes, bump version to 0.7.29 0.7.29
Michael Schroeder [Tue, 30 Apr 2024 13:29:06 +0000 (15:29 +0200)] 
Add changes, bump version to 0.7.29

15 months agoUse exclude of repo2solv/rpmdb2solv in libsolv-tools
Michael Schroeder [Tue, 30 Apr 2024 13:08:54 +0000 (15:08 +0200)] 
Use exclude of repo2solv/rpmdb2solv in libsolv-tools

15 months agoMerge pull request #559 from dirkmueller/master
Michael Schroeder [Tue, 30 Apr 2024 13:06:06 +0000 (15:06 +0200)] 
Merge pull request #559 from dirkmueller/master

Split libsolv-tools

15 months agoMerge pull request #561 from dirkmueller/remove_o3
Michael Schroeder [Tue, 30 Apr 2024 13:04:16 +0000 (15:04 +0200)] 
Merge pull request #561 from dirkmueller/remove_o3

Remove o3

15 months agoSplit libsolv-tools 559/head
Dirk Müller [Mon, 22 Apr 2024 19:21:46 +0000 (21:21 +0200)] 
Split libsolv-tools

15 months agoGo back to -O2 for relwithdebuginfo 561/head
Dirk Müller [Wed, 24 Apr 2024 10:58:51 +0000 (12:58 +0200)] 
Go back to -O2 for relwithdebuginfo

This removes about 11% of code size with neglegible performance
impact (tested via testsolv on a tumbleweed upgrade gives
equal performance)

15 months agomake testcases debian proof
Michael Schroeder [Wed, 10 Apr 2024 11:08:05 +0000 (13:08 +0200)] 
make testcases debian proof

15 months agoAdd testcases for proof generation
Michael Schroeder [Wed, 10 Apr 2024 10:33:17 +0000 (12:33 +0200)] 
Add testcases for proof generation

15 months agotestsolv: Add missing entries to resultflags2str
Michael Schroeder [Wed, 10 Apr 2024 09:04:52 +0000 (11:04 +0200)] 
testsolv: Add missing entries to resultflags2str

15 months agoRevert accidental change when sorting the decicions
Michael Schroeder [Wed, 10 Apr 2024 08:45:07 +0000 (10:45 +0200)] 
Revert accidental change when sorting the decicions

This reverts a wrong change from commit 29ebc283f819dc4c24534fa50a62931e262a5c32