Opened 20 months ago

Last modified 3 months ago

#18339 new bug

Handle additional libsolv 0.7.x cases — at Version 2

Reported by: kallisti5 Owned by: nobody
Priority: normal Milestone: R1/beta6
Component: Kits/Package Kit Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description (last modified by kallisti5)

libsolv 0.7.x has additional solver rules that need handled within our package kit...

C++ objects/linux/x86_64/release/build/libpackage/solver/LibsolvSolver.o 
../src/kits/package/solver/libsolv/LibsolvSolver.cpp: In member function ‘status_t LibsolvSolver::_AddProblem(Id)’:
../src/kits/package/solver/libsolv/LibsolvSolver.cpp:914:16: warning: enumeration value ‘SOLVER_RULE_PKG_RECOMMENDS’ not handled in switch [-Wswitch]
  914 |         switch (solver_ruleinfo(fSolver, ruleId, &sourceId, &targetId,
      |                ^
../src/kits/package/solver/libsolv/LibsolvSolver.cpp:914:16: warning: enumeration value ‘SOLVER_RULE_PKG_CONSTRAINS’ not handled in switch [-Wswitch]
../src/kits/package/solver/libsolv/LibsolvSolver.cpp:914:16: warning: enumeration value ‘SOLVER_RULE_PKG_SUPPLEMENTS’ not handled in switch [-Wswitch]
../src/kits/package/solver/libsolv/LibsolvSolver.cpp:914:16: warning: enumeration value ‘SOLVER_RULE_JOB_UNKNOWN_PACKAGE’ not handled in switch [-Wswitch]
../src/kits/package/solver/libsolv/LibsolvSolver.cpp:914:16: warning: enumeration value ‘SOLVER_RULE_JOB_UNSUPPORTED’ not handled in switch [-Wswitch]
../src/kits/package/solver/libsolv/LibsolvSolver.cpp:914:16: warning: enumeration value ‘SOLVER_RULE_YUMOBS’ not handled in switch [-Wswitch]
../src/kits/package/solver/libsolv/LibsolvSolver.cpp:914:16: warning: enumeration value ‘SOLVER_RULE_RECOMMENDS’ not handled in switch [-Wswitch]
../src/kits/package/solver/libsolv/LibsolvSolver.cpp:914:16: warning: enumeration value ‘SOLVER_RULE_BLACK’ not handled in switch [-Wswitch]
../src/kits/package/solver/libsolv/LibsolvSolver.cpp:914:16: warning: enumeration value ‘SOLVER_RULE_STRICT_REPO_PRIORITY’ not handled in switch [-Wswitch]
MkDir1 objects/linux/x86_64/release/build/libsolv 

We should likely detect the new libsolv package and optionally check for them.

~0.7.23

~0.6.4

~Unknown

  • SOLVER_RULE_YUMOBS
  • SOLVER_RULE_RECOMMENDS
  • SOLVER_RULE_BLACK
  • SOLVER_RULE_STRICT_REPO_PRIORITY

You too can try this via:

diff --git a/build/jam/repositories/HaikuPorts/x86_64 b/build/jam/repositories/HaikuPorts/x86_64
index bf09923c1a..b95965ae6f 100644
--- a/build/jam/repositories/HaikuPorts/x86_64
+++ b/build/jam/repositories/HaikuPorts/x86_64
@@ -155,8 +155,8 @@ RemotePackageRepository HaikuPorts
        libpsl_devel-0.21.1-2
        libraw-0.20.2-1
        libraw_devel-0.20.2-1
-       libsolv-0.3.0_haiku_2014_12_22-3
-       libsolv_devel-0.3.0_haiku_2014_12_22-3
+       libsolv-0.7.23-3
+       libsolv_devel-0.7.23-3
        libssh2-1.9.0-2
        libssh2_devel-1.9.0-2
        libtasn1-4.18.0-1

Change History (2)

comment:1 by kallisti5, 20 months ago

more errors

<command-line>: note: this is the location of the previous definition
Cc objects/linux/x86_64/release/build/libsolv/testcase.o 
In file included from build_packages/libsolv_source-0.7.23-3-source/develop/sources/libsolv-0.7.23-3/sources/src/pool.h:18,
                 from build_packages/libsolv_source-0.7.23-3-source/develop/sources/libsolv-0.7.23-3/sources/ext/testcase.c:15:
objects/common/build/libsolv/solvversion.h:28:2: error: invalid preprocessing directive #cmakedefine
   28 | #cmakedefine LIBSOLV_FEATURE_LINKED_PKGS
      |  ^~~~~~~~~~~
objects/common/build/libsolv/solvversion.h:29:2: error: invalid preprocessing directive #cmakedefine
   29 | #cmakedefine LIBSOLV_FEATURE_COMPLEX_DEPS
      |  ^~~~~~~~~~~
.
.

These can be solved via:

diff --git a/src/build/libsolv/Jamfile b/src/build/libsolv/Jamfile
index 3cedcf7d79..27fe16af22 100644
--- a/src/build/libsolv/Jamfile
+++ b/src/build/libsolv/Jamfile
@@ -97,6 +97,8 @@ actions GenerateLibsolvVersionHeader
                -e s,@LIBSOLV_MAJOR@,$(LIBSOLV_MAJOR),g \
                -e s,@LIBSOLV_MINOR@,$(LIBSOLV_MINOR),g \
                -e s,@LIBSOLV_PATCH@,$(LIBSOLV_PATCH),g \
+               -e 's/#cmakedefine.*LIBSOLVEXT_FEATURE_HAIKU$/#define LIBSOLVEXT_FEATURE_HAIKU/' \
+               -e '/#cmakedefine/d' \
                $(2) > $(1)
 }

However, "GenerateLibsolvVersionHeader" feels like an abomination in general. It seems to be fixing up libsolv_source packages for the build host.

Last edited 20 months ago by kallisti5 (previous) (diff)

comment:2 by kallisti5, 20 months ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.