[asdf-devel] how to query root of a system
Hi, Suppose I have a library named MYLIBRARY which was installed in the directory /somewhere/foo/ (eg by ASDF-Install, clbuild or manually by the user). It has a /somewhere/foo/mylibrary.asd definition file, which was duly symlinked to mylibrary.asd in ASDF's central registry. The user can load it the usual way using ASDF. Is it possible to query the root directory somehow using the name? Eg I am looking for (query-system-root :mypackage) ; evaluates to #P"/somewhere/foo/" I could not find how to do this in the manual. Thanks, Tamas
2009/10/26 Tamas Papp <tkpapp@gmail.com>:
Hi,
Suppose I have a library named MYLIBRARY which was installed in the directory /somewhere/foo/ (eg by ASDF-Install, clbuild or manually by the user). It has a /somewhere/foo/mylibrary.asd definition file, which was duly symlinked to mylibrary.asd in ASDF's central registry. The user can load it the usual way using ASDF.
Is it possible to query the root directory somehow using the name? Eg I am looking for
(query-system-root :mypackage) ; evaluates to #P"/somewhere/foo/"
I could not find how to do this in the manual.
(defun query-system-root (x) (asdf:component-pathname (asdf:find-system x))) [ François-René ÐVB Rideau | Reflection&Cybernethics | http://fare.tunes.org ] That life is worth living is the most necessary of assumptions, and were it not assumed, the most impossible of conclusions. -- George Santayana
Is it a contingent fact about this system that we have an absolute pathname here, o have we somehow ended up with a function named foo-relative-pathname that returns absolute pathnames? ___ Robert P. Goldman Principal Scientist, SIFT, LLC www.sift.info ...... Original Message ....... On Wed, 28 Oct 2009 12:22:37 +0100 "Attila Lendvai" <attila.lendvai@gmail.com> wrote:
(defun query-system-root (x) (asdf:component-pathname (asdf:find-system x)))
or with a not too old ASDF:
TEST> (asdf:system-relative-pathname :hu.dwim.stefil "") #P"/home/ati/workspace/hu.dwim.stefil/"
-- attila
_______________________________________________ asdf-devel mailing list asdf-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/asdf-devel
If you have a suggestion about where this information should live in the manual, I will try to submit a patch. ___ Robert P. Goldman Principal Scientist, SIFT, LLC www.sift.info ...... Original Message ....... On Mon, 26 Oct 2009 15:43:50 +0100 "Tamas Papp" <tkpapp@gmail.com> wrote:
Hi,
Suppose I have a library named MYLIBRARY which was installed in the directory /somewhere/foo/ (eg by ASDF-Install, clbuild or manually by the user). It has a /somewhere/foo/mylibrary.asd definition file, which was duly symlinked to mylibrary.asd in ASDF's central registry. The user can load it the usual way using ASDF.
Is it possible to query the root directory somehow using the name? Eg I am looking for
(query-system-root :mypackage) ; evaluates to #P"/somewhere/foo/"
I could not find how to do this in the manual.
Thanks,
Tamas
_______________________________________________ asdf-devel mailing list asdf-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/asdf-devel
participants (4)
-
Attila Lendvai
-
Faré
-
Robert P. Goldman
-
Tamas Papp