[MacPorts] #15198: mzscheme-371 - incorrect collects-dir

MacPorts trac at macosforge.org
Sun May 4 09:08:34 PDT 2008


#15198: mzscheme-371 - incorrect collects-dir
---------------------------------------+------------------------------------
 Reporter:  eric.m.kidd at dartmouth.edu  |       Owner:  macports-tickets at lists.macosforge.org
     Type:  defect                     |      Status:  new                                  
 Priority:  Normal                     |   Milestone:                                       
Component:  ports                      |     Version:  1.6.0                                
 Keywords:                             |  
---------------------------------------+------------------------------------
 mzscheme 371 is has an incorrect value for collects-dir, which breaks the
 compilation manager.

 See the [http://list.cs.brown.edu/pipermail/plt-
 scheme/2008-May/024539.html discussion thread] for details of why the
 current behavior is wrong, and why it causes a problem.

 To reproduce this bug, save the following script as collects-test.ss:

 {{{
 ;; Print out two paths built into our executable.
 (printf "exec-file: ~s~ncollects-dir: ~s~n"
         (find-system-path 'exec-file)
         (find-system-path 'collects-dir))

 ;; Find the default collects-dir built into our executable.  This
 ;; path may be relative to exec-file's parent directory.  This will
 ;; let us know where PLT thinks it should be finding its
 ;; collections.
 (define (default-collects-dir)
   (call-with-values (lambda () (split-path (find-system-path 'exec-file)))
     (lambda (base name must-be-dir?)
       (let [[collects (find-system-path 'collects-dir)]]
         (if (eq? base 'relative)
           (path->complete-path collects)
           (path->complete-path collects base))))))

 ;; Does this work?
 (if (file-exists? (build-path (default-collects-dir) "mzlib" "list.ss"))
   (printf "OK: This copy of mzscheme is set up correctly.~n")
   (printf "BROKEN: This copy of mzscheme has a bad collects-dir.~n"))
 }}}

 Then run it from the command line:

 {{{
 $ mzscheme -r collects-test.ss
 exec-file: #<path:mzscheme>
 collects-dir: #<path:../collects>
 BROKEN: This copy of mzscheme has a bad collects-dir.
 }}}

 Desired behavior: This script should print "OK".

 Thank you to the MacPorts maintainers for such a useful port system!

 (Yes, I'm aware that MacPorts mzscheme is currently unmaintained. This bug
 is more a reminder to a future maintainer than anything else.)

-- 
Ticket URL: <http://trac.macosforge.org/projects/macports/ticket/15198>
MacPorts </projects/macports>
Ports system for Mac OS


More information about the macports-tickets mailing list