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

3748 Commits

Author SHA1 Message Date
Christoph Grüninger
1de3398f86 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)
2025-05-14 21:16:19 +02:00
Michael Schroeder
1181b9664b Merge pull request #589 from gruenich/feature/implicit-function-declaration
Add includes for getopt() and strcasecmp()
2025-05-14 14:06:52 +02:00
Michael Schroeder
1473e06680 Merge pull request #588 from gruenich/feature/decision-return-void
decision.c: void function should not return anything
2025-05-14 14:06:11 +02:00
Christoph Grüninger
4330ca17e8 Add includes for getopt() and strcasecmp()
Found by GCC in C23 mode (implicit-function-declaration).
2025-05-13 19:34:04 +02:00
Christoph Grüninger
94b74a764a 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).
2025-05-13 19:12:54 +02:00
Michael Schroeder
22964c8a91 Add apk2solv man page 2025-04-15 13:13:27 +02:00
Michael Schroeder
5c99be44c4 Add regression test for last commit 2025-04-15 12:53:25 +02:00
Michael Schroeder
e4b84315fe Merge pull request #584 from AntoinePrv/missing-headers
Add missing headers
2025-04-14 15:18:14 +02:00
AntoinePrv
b69d0a1cd4 add missing headers 2025-04-14 15:11:35 +02:00
Michael Schroeder
8185d1775f 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.
2025-04-14 14:14:59 +02:00
Michael Schroeder
f31e3d3b4a rpms2solv: add -i option to include the pkgid 2025-04-10 15:43:09 +02:00
Michael Schroeder
181c7fe2b8 Use the truncated sha256 sigtag if there is no header+payload md5
Rpmv6 will no longer have a header+payload digest.
2025-04-10 15:40:59 +02:00
Michael Schroeder
95f64952e3 Add changes, bump version to 0.7.32 0.7.32 2025-04-03 13:10:26 +02:00
Michael Schroeder
69e5151043 Add dataiterator_final_{solvable,repo} functions
Those are needed by libzypp. They tell the dataiterator that it
should stay in the solvable/repository.
2025-04-03 13:05:54 +02:00
Michael Schroeder
a94c54fe29 Merge pull request #578 from bmwiedemann/yastruby
Provide a symbol specific for the ruby-version
2025-04-03 11:36:00 +02:00
Michael Schroeder
1d3bd2bf20 Fix typo that broke restoration of CMAKE_FIND_LIBRARY_SUFFIXES 2025-04-02 16:01:15 +02:00
Bernhard M. Wiedemann
19cdbdf55a Provide a symbol specific for the ruby-version
so that yast does not break across updates (boo#1235598)
2025-03-31 16:55:55 +02:00
Michael Schroeder
fb169fc593 SEARCH_THISSOLVID is in use by libzypp 2025-03-31 16:21:20 +02:00
Michael Schroeder
04c2f0a50f Hide a couple of internal definitions 2025-03-31 15:59:57 +02:00
Michael Schroeder
5ed6317b09 Merge pull request #576 from gruenich/feature/drop-travis-ci
Remove file for travis CI
2025-03-28 14:24:22 +01:00
Michael Schroeder
a654cc5319 Merge pull request #577 from gruenich/feature/github-action-checkout-v4
[ci] Update actions/checkout to version 4
2025-03-28 14:21:41 +01:00
Christoph Grüninger
c384f6eaac Remove file for travis CI
This should be no longer used for a long time
2025-03-25 14:44:00 +01:00
Michael Schroeder
0a91dafc16 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.
2025-03-20 15:37:10 +01:00
Michael Schroeder
4f34f8890c apk: tweak apk_add_hdrid a bit
Make sure that the checksum starts with 'Q'.
2025-03-20 15:11:19 +01:00
Michael Schroeder
b4bec60aed 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.
2025-03-20 11:06:01 +01:00
Michael Schroeder
a65b458134 repo_apkv3: be more correct in add_add_idb_pkg
Should not matter because the adb blocks are always fitting
in 30 bits.
2025-03-20 11:04:23 +01:00
Michael Schroeder
fb40d94659 Split off common apk_fillbuf function 2025-03-20 11:03:41 +01:00
Michael Schroeder
f0e9108a8a Remove CMAKE_MAJOR_VERSION comparison 2025-03-19 15:26:20 +01:00
Michael Schroeder
768c8f4c58 Merge pull request #581 from ppisar/cmake4
Increase CMake version to 3.5
2025-03-19 15:23:16 +01:00
Petr Písař
4a0b11dcdf 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.
2025-03-04 11:51:07 +01:00
Michael Schroeder
2a8217d6dd Merge pull request #580 from ppisar/c23
Fix building in ISO C23
2025-02-10 10:56:31 +01:00
Petr Písař
5d36ad3e92 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
2025-02-07 15:39:51 +01:00
Christoph Grüninger
95691140bd [ci] Update actions/checkout to version 4 2025-01-21 00:52:06 +01:00
Michael Schroeder
5e4ff5461e Fix apkv3 dependency operator handling 2025-01-20 16:49:21 +01:00
Michael Schroeder
1639245a4a Also set SOLVABLE_DOWNLOADSIZE for apkv2 indexes 2025-01-20 16:47:10 +01:00
Michael Schroeder
997a5ad99f Add missing solv_free in the adb_read_adb_blk error case 2025-01-17 14:12:15 +01:00
Michael Schroeder
cf65c2bdc4 Add liblzma-dev to fix the CI build 2025-01-17 10:13:23 +01:00
Michael Schroeder
faef2f421f Fix bit shift in adb_read_blk_header
And also move it to the other file read functions.
2025-01-16 16:40:21 +01:00
Michael Schroeder
fab399d839 Rename APK_ADD_INDEX to APK_ADD_INSTALLED_DB while we can 2025-01-15 11:53:17 +01:00
Michael Schroeder
1ebff91704 Implement apkv3 support 2025-01-15 11:46:24 +01:00
Michael Schroeder
5059a587b6 Allow an empty index file in repo_add_apk_repo 2024-12-18 11:00:35 +01:00
Michael Schroeder
eb73ed0d70 Fix repo_add_arch_repo return type 2024-12-17 12:15:54 +01:00
Michael Schroeder
e423f277a9 Implement decompression in repo_add_apk_repo()
We need this to support apkv3 index files.
2024-12-17 12:15:00 +01:00
Michael Schroeder
3d318478fb Make LIBSOLVEXT_FEATURE_APK available in solvversion.h 2024-11-28 14:21:43 +01:00
Michael Schroeder
62e84f6bc5 Add apk.h. Not my day. 2024-11-28 14:13:13 +01:00
Michael Schroeder
9e8476e912 Add forgotten apk2solv.c file 2024-11-28 14:11:40 +01:00
Michael Schroeder
38c088a9d1 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.
2024-11-28 13:52:43 +01:00
Michael Schroeder
fbbf2565c1 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.
2024-11-28 13:33:08 +01:00
Michael Schroeder
224cab32cb Move tar handling from repo_arch into its own file
We'll need it for apk packages.
2024-11-28 13:08:39 +01:00
Michael Schroeder
381322c07c Fix repo_add_arch_local() declaration 2024-11-25 12:03:29 +01:00