From a06f9f7ffb2226788f07ae713a1bf63029e17b3c Mon Sep 17 00:00:00 2001
From: Francois-Rene Rideau <fare@tunes.org>
Date: Thu, 8 Apr 2010 02:26:42 -0400
Subject: [PATCH] Add report function for duplicate-names (fix lp bug 557306)

---
 asdf.lisp | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/asdf.lisp b/asdf.lisp
index 0ff04243..4b7fb072 100644
--- a/asdf.lisp
+++ b/asdf.lisp
@@ -735,7 +735,10 @@ actually-existing directory."
   ((components :initarg :components :reader circular-dependency-components)))
 
 (define-condition duplicate-names (system-definition-error)
-  ((name :initarg :name :reader duplicate-names-name)))
+  ((name :initarg :name :reader duplicate-names-name))
+  (:report (lambda (c s)
+             (format s "~@<Error while defining system: multiple components are given same name ~A~@:>"
+                     (duplicate-names-name c)))))
 
 (define-condition missing-component (system-definition-error)
   ((requires :initform "(unnamed)" :reader missing-requires :initarg :requires)
@@ -1948,8 +1951,7 @@ Returns the new tree (which probably shares structure with the old one)"
           (loop :for c in (module-components ret) :do
             (if (gethash (component-name c)
                          name-hash)
-                (error 'duplicate-names
-                       :name (component-name c))
+                (error 'duplicate-names :name (component-name c))
                 (setf (gethash (component-name c)
                                name-hash)
                       t)))))
-- 
GitLab