Skip to content
Browse files

Handle slashed names more.

  • Loading branch information...
1 parent fb7740c commit 40e579227a0a4af90c3570765dfd0d7d5bd12689 @xach xach committed Feb 10, 2014
Showing with 12 additions and 3 deletions.
  1. +12 −3 dist-cache.lisp
15 dist-cache.lisp
@@ -229,7 +229,7 @@ if needed."
"If true, a depcheck will fail if :author/:description/:license
options are missing from a system.")
-(defun depcheck (system-name system)
+(defun depcheck (primary-system sub-system)
(let ((win (translate-logical-pathname #p"quicklisp-controller:tmp;depcheck-win.txt"))
(fail *depcheck-fail-file*))
@@ -238,13 +238,17 @@ if needed."
(run "depcheck"
(native (translate-logical-pathname *system-file-index-file*))
- system-name system win fail *system-metadata-required-p*))
+ primary-system sub-system win fail *system-metadata-required-p*))
(let* ((won (probe-file win))
(first-line (and won (ignore-errors (first-line-of win))))
(result (and first-line (split-spaces first-line))))
(unless result
(when won
(delete-file win)))
+ (when (member sub-system (rest result) :test 'string=)
+ (warn "~S is a dependency of itself in depcheck" sub-system)
+ (setf (rest result)
+ (remove sub-system (rest result) :test 'string=)))
(values result (probe-file win) (probe-file fail)))))
(defun system-file-magic (system-name)
@@ -307,13 +311,18 @@ if needed."
(list system-file system)))
+(defun encode-string-for-filesystem (string)
+ "Encode STRING in a way that makes it suitable for using as a
+ directory component, pathname-name, or pathname-type."
+ (substitute #\_ #\/ string))
(defun winfail-file (winfail source system-file system)
(let ((name (format nil "~A_~A_~A_~A"
(project-name source)
- (build-relative (make-pathname :name name
+ (build-relative (make-pathname :name (encode-string-for-filesystem name)
:type "txt"
:directory (list :relative winfail))

0 comments on commit 40e5792

Please sign in to comment.
Something went wrong with that request. Please try again.