[cl-debian] Bug#457919: cl-asdf: please merge a run-shell-command patch for LispWorks

Chun TIAN (binghe) tianchun at corp.netease.com
Thu Dec 27 03:31:52 EST 2007


Package: cl-asdf
Version: 1.109-2
Severity: wishlist

The function asdf:run-shell-command is not right for LispWorks 5.x:

    #+lispworks
    (system:call-system-showing-output
     command
     :shell-type "/bin/sh"
     :output-stream *verbose-out*)

I test a expression on LispWorks 5.0:

CL-USER 1 > (system:call-system-showing-output "id -u" :shell-type
"/bin/sh" :output-stream t)
; id -u
; 10003
0

To make common-lisp-controller:get-uid work well, the call to
system:call-system-showing-output must come with two additional keyword
arguments, :show-cmd nil, and :prefix "".

I running LispWorks 5.x on Debian, I use this script to save a LispWorks
 image which can then load all debian CL packages:

(in-package :cl-user)

(load-all-patches)

(load
"/usr/share/common-lisp/source/common-lisp-controller/common-lisp-controller.lisp")
(common-lisp-controller:init-common-lisp-controller-v4 "lispworks")
;; (load "asdf-patch")

(save-image (merge-pathnames
             (make-pathname :name "lispworks")
             (lisp-image-name))
            :remarks "LispWorks 5.0.2" :environment t)

So, I HOPE a patch can be merged into cl-asdf, as in attach
(asdf.lisp.patch).

Now I must load a patch for this purpose (asdf-patch.lisp).

Thanks!

Chun TIAN (binghe)


-- 
(defsignature (田春 Chun Tian (binghe))
  (网易杭州研究院 系统管理员)
  (E-Mail tianchun at corp.netease.com)
  (Phone (0571)88271736 (020)85106834)
  (POPO binghe.lisp)
  (GTalk binghe.lisp at gmail.com))
-------------- next part --------------
A non-text attachment was scrubbed...
Name: asdf.lisp.patch
Type: text/x-diff
Size: 342 bytes
Desc: not available
Url : http://common-lisp.net/pipermail/cl-debian/attachments/20071227/7ca346fa/asdf.lisp.bin
-------------- next part --------------
(in-package :asdf)

(defun run-shell-command (control-string &rest args)
  "Interpolate ARGS into CONTROL-STRING as if by FORMAT, and
synchronously execute the result using a Bourne-compatible shell, with
output to *VERBOSE-OUT*.  Returns the shell's exit code."
  (let ((command (apply #'format nil control-string args)))
    (format *verbose-out* "; $ ~A~%" command)
    #+sbcl
    (sb-ext:process-exit-code
     (sb-ext:run-program  
      #+win32 "sh" #-win32 "/bin/sh"
      (list  "-c" command)
      #+win32 #+win32 :search t
      :input nil :output *verbose-out*))
    
    #+(or cmu scl)
    (ext:process-exit-code
     (ext:run-program  
      "/bin/sh"
      (list  "-c" command)
      :input nil :output *verbose-out*))

    #+allegro
    (excl:run-shell-command command :input nil :output *verbose-out*)
    
    #+lispworks
    (system:call-system-showing-output
     command
     :shell-type "/bin/sh"
     :prefix ""
     :show-cmd nil
     :output-stream *verbose-out*)
    
    #+clisp				;XXX not exactly *verbose-out*, I know
    (ext:run-shell-command  command :output :terminal :wait t)

    #+openmcl
    (nth-value 1
	       (ccl:external-process-status
		(ccl:run-program "/bin/sh" (list "-c" command)
				 :input nil :output *verbose-out*
				 :wait t)))
    #+ecl ;; courtesy of Juan Jose Garcia Ripoll
    (si:system command)
    #-(or openmcl clisp lispworks allegro scl cmu sbcl ecl)
    (error "RUN-SHELL-PROGRAM not implemented for this Lisp")
    ))


More information about the cl-debian mailing list