Changeset 9174 in project


Ignore:
Timestamp:
03/06/08 01:42:42 (12 years ago)
Author:
Ivan Raikov
Message:

Bug fixes for the case when installing from local repository.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chicken/trunk/chicken-setup.scm

    r9159 r9174  
    658658    ))
    659659
    660 (define (copy-file from to #!optional (err #t))
     660(define (copy-file from to #!optional (err #t) (prefix (installation-prefix)))
    661661  (let ((from (if (pair? from) (car from) from))
    662662        (to ((lambda (pre) (let ((to-path (if (pair? from) (make-pathname to (cadr from)) to)))
    663663                             (if (and pre (not (string-prefix? pre to-path)))
    664664                                 (make-pathname pre to-path) to-path)))
    665              (installation-prefix))))
     665             prefix)))
    666666    (ensure-directory to)
    667667    (cond ((or (glob? from) (file-exists? from))
    668            (run (,*copy-command* ,(quotewrap from) ,(quotewrap to))) )
     668           (begin
     669             (run (,*copy-command* ,(quotewrap from) ,(quotewrap to)))
     670             to))
    669671          (err (error "file does not exist" from))
    670672          (else (warning "file does not exist" from)))))
     
    977979  (cond (*local-repository*
    978980         (when (setup-verbose-flag) (printf "fetching from local directory ~a ...~%" *local-repository*))
    979          (let ((p (->string item)))
    980            (copy-file (make-pathname *local-repository* p) (make-pathname #f p "egg-dir")) ) )
     981         (let* ((p  (->string item))
     982               (fpath  (make-pathname (setup-download-directory) p "egg-dir")))
     983           (copy-file (make-pathname *local-repository* p) fpath #t #f)))
     984
    981985        (*svn-repository*
    982986         (when (setup-verbose-flag) (printf "fetching from svn repository ~a ...~%" *svn-repository*))
    983          (let ((p (->string item)))
     987         (let* ((p (->string item))
     988               (fpath (make-pathname (setup-download-directory) p "egg-dir")))
    984989           (run (svn co ,(if *revision* (conc "--revision " *revision*) "")
    985                      ,(make-pathname *svn-repository* p) ,(make-pathname #f p "egg-dir"))) ) )
     990                     ,(make-pathname *svn-repository* p) ,fpath))
     991           fpath))
     992
    986993        (else
    987994         (match hostdata
     
    10341041              (set! *last-decent-host* (car *repository-hosts*))
    10351042              (set! *dont-ask* #t)
    1036               (let ((fpath
    1037                      (download-data
    1038                       *last-decent-host*
    1039                       (pathname-file ext)
    1040                       (pathname-replace-extension ext "egg") )))
    1041                 fpath))
     1043              (download-data
     1044               *last-decent-host*
     1045               (pathname-file ext)
     1046               (pathname-replace-extension ext "egg") ))
     1047
    10421048             (else
    10431049              (download-repository-tree)
     
    10661072               (let ((f (pathname-strip-directory fpath)))
    10671073                 (when df
    1068                    (unpack/enter f)
     1074                   (unpack/enter fpath)
    10691075                   (let ((sfile (pathname-replace-extension f "setup")))
    10701076                     (when (and (not (file-exists? sfile)) (file-exists? "tags") )
Note: See TracChangeset for help on using the changeset viewer.