Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-lisp
Navigation:
Lists: gentoo-lisp: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-lisp@g.o
From: "Marijn Schouten (hkBst)" <hkBst@g.o>
Subject: Re: common-lisp.eclass cleanup
Date: Thu, 18 Oct 2007 19:15:56 +0200
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Stelian Ionescu wrote:
>> common-lisp-system-symlink() {
>> 	dodir "${CLSYSTEMROOT}"
>> 	# if no arguments received, default to
>> 	# the contents of ${CLSYSTEMS}
>> 	if [ $# -eq 0 ]; then
>> 		for package in ${CLSYSTEMS} ; do
>> 			common-lisp-install-single-system "${package}"
>> 		done
>> 	else
>>        local _oldclpackage="${CLPACKAGE}"
>>        [ "${1}" == "-p" ] && { CLPACKAGE="${2}" ; shift ; shift ; }
>> <-- what's the point of setting CLPACKAGE here? I'm not sure I like
>> influencing common-lisp-install-single-system in that way. -->
>>        [ $# -eq 0 ] && die "common-lisp-system-symlink needs more arguments"
>> 		for package in "$@" ; do
>> 			common-lisp-install-single-system "${package}"
>> 		done
>>        CLPACKAGE="${_oldclpackage}"
>> 	fi
>> }
> 
> setting CLPACKAGE that way is the equivalent of this:
> 
> (defun common-lisp-system-symlink (system &key (package *clpackage*))
>   (let ((*clpackage* package)) ...))
> 
> I'm faking default arguments: when $1 is "-p" CLPACKAGE gets set
> temporarily to $2, then restored to its initial value. I've seen this
> idiom elsewhere in sh code
> anyway, I've removed this since it's unnecessary

I'm glad to see it go.

I've added the following proposed replacement to the eclass. The underscore
will prevent it from being used right away:

# if no arguments received, default to the contents of ${CLSYSTEMS}
_common-lisp-system-symlink() {
        dodir "${CLSYSTEMROOT}"

        for package in $([[ $# = 0 ]] && echo ${CLSYSTEMS} || echo "$@") ; do
                common-lisp-install-single-system "${package}"
        done
}

Please test it.

Marijn

- --
Marijn Schouten (hkBst), Gentoo Lisp project
<http://www.gentoo.org/proj/en/lisp/>, #gentoo-lisp on FreeNode
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHF5TMp/VmCx0OL2wRAj4QAJ9S01YNwip2pDs8FF8rDrmkHqb5LwCeMPj1
tsXPUTOAvmz1dURd8LcY0Y4=
=Tebj
-----END PGP SIGNATURE-----
-- 
gentoo-lisp@g.o mailing list


References:
common-lisp.eclass cleanup
-- Stelian Ionescu
Re: common-lisp.eclass cleanup
-- Christian Faulhammer
Re: common-lisp.eclass cleanup
-- Stelian Ionescu
Re: common-lisp.eclass cleanup
-- Marijn Schouten (hkBst)
Re: common-lisp.eclass cleanup
-- Stelian Ionescu
Navigation:
Lists: gentoo-lisp: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: common-lisp.eclass cleanup
Next by thread:
sbcl+slime
Previous by date:
Re: common-lisp.eclass cleanup
Next by date:
sbcl+slime


Updated Jun 17, 2009

Summary: Archive of the gentoo-lisp mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.