From 32ff43179ceae60add866b6642d5f236ee6ed71c Mon Sep 17 00:00:00 2001 From: Daniel Jay Haskin Date: Sat, 2 Mar 2024 17:52:20 -0700 Subject: [PATCH] Clip in the wall --- src/resolve.lisp | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/src/resolve.lisp b/src/resolve.lisp index 4825931..ba2c87b 100644 --- a/src/resolve.lisp +++ b/src/resolve.lisp @@ -346,3 +346,38 @@ vp-dnf-clause)) (vp-dnf req))))) +(define-condition 'resolution-error + ((present-packages :initarg :present-packages + :initform (error "a list of present packages is required.") + :reader present-packages) + (found-packages :initarg :found-packages + :initform + :reader found-packages) + (absent-requirements :initarg :absent-requirements + :reader absent-requirements) + (cnf-clauses :initarg :cnf-clauses + :reader cnf-clauses) + (reason :initarg :reason + :reader reason) + ( + (:report + (lambda (c s) + (format s "resolution error: ~a" c)))) +(defun make-resolution-error + (present-packages +(defun resolve-dependencies + (repo + present-packages + found-packages + absent-requirements + cnf-clauses + package-graph) + (if (null cnf-clauses) + (values + :successful + package-graph) + (let ((fclause (first clauses)) + (rclause (rest clauses))) + (with-slots (status name vp-dnf requirer) fclause + + -- 2.45.2