2 # Extend SatSolver::Problem with to_s
5 class Satsolverx::Problem
8 when SatSolver::SOLVER_PROBLEM_UPDATE_RULE #1
9 reason = "problem with installed"
10 when SatSolver::SOLVER_PROBLEM_JOB_RULE #2
11 reason = "conflicting requests"
12 when SatSolver::SOLVER_PROBLEM_JOB_NOTHING_PROVIDES_DEP #3
13 reason = "nothing provides requested"
14 when SatSolver::SOLVER_PROBLEM_NOT_INSTALLABLE #4
15 reason = "not installable"
16 when SatSolver::SOLVER_PROBLEM_NOTHING_PROVIDES_DEP #5
17 reason = "nothing provides rel required by source"
18 when SatSolver::SOLVER_PROBLEM_SAME_NAME #6
19 reason = "cannot install both"
20 when SatSolver::SOLVER_PROBLEM_PACKAGE_CONFLICT #7
21 reason = "source conflicts with rel provided by target"
22 when SatSolver::SOLVER_PROBLEM_PACKAGE_OBSOLETES #8
23 reason = "source obsoletes rel provided by target"
24 when SatSolver::SOLVER_PROBLEM_DEP_PROVIDERS_NOT_INSTALLABLE #9
25 reason = "source requires rel but no providers are installable"
27 reason = "**unknown**"
29 "[#{self.reason}]: #{reason}] Source #{self.source}, Rel #{self.relation}, Target #{self.target}"