Skip to content
Browse files

Added packed projects searcher

  • Loading branch information...
1 parent bf7a30e commit b16e75f245121e731d02a9a4b29c50809e979344 @vseloved committed Apr 4, 2012
Showing with 27 additions and 0 deletions.
  1. +26 −0 packed.lisp
  2. +1 −0 setup.lisp
View
26 packed.lisp
@@ -0,0 +1,26 @@
+;;;; packed.lisp
+
+;;;
+;;; Support for finding systems inside tarballs
+;;;
+
+(in-package #:quicklisp-client)
+
+(defun packed-projects-searcher (system-name)
+ "This function is added to ASDF:*SYSTEM-DEFINITION-SEARCH-FUNCTIONS*
+to use the packed projects anywhere in ASDF:*CENTRAL-REGISTRY*."
+ (let ((tar (qmerge "tmp/release-install.tar")))
+ (dolist (dir asdf:*central-registry*)
+ (dolist (archive (merge-pathnames "*.tar.gz" dir))
+ (unless (probe-directory (subseq (namestring archive) 0
+ (- (length (namestring archive)) 7)))
+ (ensure-directories-exist tar)
+ (gunzip archive tar)
+ (pushnew (unpack-tarball tar :directory dir)
+ asdf:*central-registry*
+ :test #'string=
+ :key (lambda (path)
+ (etypecase path
+ (stringp path)
+ (pathname (namestring path)))))
+ (asdf:find-system system-name))))))
View
1 setup.lisp
@@ -200,6 +200,7 @@
(setf asdf:*system-definition-search-functions*
(append asdf:*system-definition-search-functions*
(list 'local-projects-searcher
+ 'packed-projects-searcher
'system-definition-searcher))))
(let ((files (nconc (directory (qmerge "local-init/*.lisp"))
(directory (qmerge "local-init/*.cl")))))

0 comments on commit b16e75f

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