From 4cd7aad0c10677d10c8d27d6ff2d71009f8b98ac Mon Sep 17 00:00:00 2001
From: Francois-Rene Rideau <tunes@google.com>
Date: Sun, 18 Dec 2011 20:19:16 -0500
Subject: [PATCH] =?UTF-8?q?2.019.8:=20fixing=20yet=20another=20bug=20found?=
 =?UTF-8?q?=20by=20Sergey=20Katrevich.=20When=20specifying=20a=20function?=
 =?UTF-8?q?=20as=20output-translation,=20we=20accept=20either=20(:function?=
 =?UTF-8?q?=20symbol)=20or=20(:function=20(lambda=20(pathname=20absolute-s?=
 =?UTF-8?q?ource)=20...)=20The=20second=20case=20wasn't=20properly=20handl?=
 =?UTF-8?q?ed.=20Minimal=20testing=20included.=20=D1=81=D0=BF=D0=B0=D1=81?=
 =?UTF-8?q?=D0=B8=D0=B1=D0=BE=20=D0=A1=D0=B5=D1=80=D0=B3=D0=B5=D0=B9.?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 Makefile                   |  2 ++
 asdf.asd                   |  2 +-
 asdf.lisp                  | 15 +++++++--------
 test/test-utilities.script | 10 ++++++++++
 4 files changed, 20 insertions(+), 9 deletions(-)

diff --git a/Makefile b/Makefile
index e414d149..c15d20dc 100644
--- a/Makefile
+++ b/Makefile
@@ -31,6 +31,8 @@ ALLEGROMODERN ?= mlisp
 
 # website, tag, install
 
+default: test
+
 install: archive-copy
 
 archive:
diff --git a/asdf.asd b/asdf.asd
index 8fd0a1e7..49873e2b 100644
--- a/asdf.asd
+++ b/asdf.asd
@@ -14,7 +14,7 @@
   :licence "MIT"
   :description "Another System Definition Facility"
   :long-description "ASDF builds Common Lisp software organized into defined systems."
-  :version "2.019.7" ;; to be automatically updated by bin/bump-revision
+  :version "2.019.8" ;; to be automatically updated by bin/bump-revision
   :depends-on ()
   :components
   ((:file "asdf")
diff --git a/asdf.lisp b/asdf.lisp
index a7fe42f7..6c195bf3 100644
--- a/asdf.lisp
+++ b/asdf.lisp
@@ -1,5 +1,5 @@
 ;;; -*- mode: Common-Lisp; Base: 10 ; Syntax: ANSI-Common-Lisp -*-
-;;; This is ASDF 2.019.7: Another System Definition Facility.
+;;; This is ASDF 2.019.8: Another System Definition Facility.
 ;;;
 ;;; Feedback, bug reports, and patches are all welcome:
 ;;; please mail to <asdf-devel@common-lisp.net>.
@@ -107,7 +107,7 @@
          ;; "2.345.6" would be a development version in the official upstream
          ;; "2.345.0.7" would be your seventh local modification of official release 2.345
          ;; "2.345.6.7" would be your seventh local modification of development version 2.345.6
-         (asdf-version "2.019.7")
+         (asdf-version "2.019.8")
          (existing-asdf (find-class 'component nil))
          (existing-version *asdf-version*)
          (already-there (equal asdf-version existing-version)))
@@ -3457,13 +3457,12 @@ Please remove it from your ASDF configuration"))
 
 (defun* location-function-p (x)
   (and
-   (consp x)
    (length=n-p x 2)
-   (or (and (equal (first x) :function)
-            (typep (second x) 'symbol))
-       (and (equal (first x) 'lambda)
-            (cddr x)
-            (length=n-p (second x) 2)))))
+   (eq (car x) :function)
+   (or (symbolp (cadr x))
+       (and (consp (cadr x))
+            (eq (caadr x) 'lambda)
+            (length=n-p (cadadr x) 2)))))
 
 (defun* validate-output-translations-directive (directive)
   (or (member directive '(:enable-user-cache :disable-cache nil))
diff --git a/test/test-utilities.script b/test/test-utilities.script
index 30197eff..b4ebe3cb 100644
--- a/test/test-utilities.script
+++ b/test/test-utilities.script
@@ -44,4 +44,14 @@
  (not (asdf::version-satisfies (asdf:asdf-version) "666")))
 (assert
   (equal (asdf::split-absolute-pathnames "/foo:/bar" "baz") '("/foo" "/bar")))
+(assert (equal (mapcar 'location-function-p
+                       '((:function f)
+                         (:function (lambda (path absolute-source)
+                                      (declare (ignore absolute-source))
+                                      path))
+                         (function previous-isnt-keyword)
+                         (:function f too many arguments)
+                         (:function (:lambda isnt lambda))
+                         (:function (lambda (too many args) blah))))
+               '(t t nil nil nil nil)))
 )
-- 
GitLab