README.txt

Feel free to comunicate with me by email about any question/suggestion: yahoo.com account SnorkYaght

Feel free to comunicate with me by email about any question/suggestion: yahoo.com account Snork_Yaght

***

I don`t know if it`s common problem 
but I have an error while "require" mongodb 
in just deployed plt with original mongodb package:

make-hasheq: expects no arguments, given 1: ((1 . function) (2 . binary) (3 . uuid) (5 . md5) (128 . user-defined))

If you encounter this problem you can use this patch.
It will backup file causing error and alter original file.

Don`t forget to run 'setup-plt -P jaymccarthy mongodb.plt 1 4'
when the script will be finished.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(require planet/util)
(require file/md5)

(let* 
    ((mapping-path 
      (resolve-planet-path 
       '(planet jaymccarthy/mongodb:1:4/lib/mapping.ss)))
     
     (patch-file (lambda () 
                   
                   (letrec 
                       
                       ((patch
                         (lambda (content (current-line-number 0))
                           (cond ((empty? content) empty)
                                 (#t (cons 
                                      (cond ((ormap (lambda (num) (= current-line-number num)) '(6 8))
                                             (regexp-replace "make-hasheq" (car content) "make-immutable-hasheq"))
                                            (#t (car content)))
                                      (patch (cdr content) (add1 current-line-number))))
                                 )))
                        
                        (get-bak-path 
                         (lambda (existing-path (number 0))
                           (let ((path (path-replace-suffix 
                                        existing-path 
                                        (string-append "." (number->string number) ".bak"))))
                             (cond ((file-exists? path) (get-bak-path existing-path (add1 number)))
                                   (#t path)))))
                        
                        (content (file->lines mapping-path)))
                     
                     (rename-file-or-directory mapping-path (get-bak-path mapping-path))                          
                     (display-lines-to-file (patch content) mapping-path)
                     )))
     
     (mapping-md5 (md5 (open-input-file mapping-path)))
     
     (ask (lambda ( question . vars )
            (apply printf question vars)
            (printf "~ncontinue? (y/n): ")
            (let ((answer (read)))
              (ormap (lambda (var) (equal? answer var))
                     '(y yes Y Yes))))))

  
  (when
      (cond ((equal? mapping-md5 #"e55957aadb6db4254b2fc3a17f9fa593")
             (ask "ready to patch"))
            ((equal? mapping-md5 #"27718a73da57aaa9192adfcff2390ecd")
             (ask "md5 for file ~a is ~a~nit looks like file is already patched.~nAre you sure you want to proceed?"
                  mapping-path mapping-md5))
            (#t   
             (ask "~n~nunexpected md5 checksum of ~a (~a)~npatch was written looking at another file, result is unpredictable." 
                  mapping-path mapping-md5)))
    
    (patch-file)
    (printf "~nfinished~nplease run 'setup-plt -P jaymccarthy mongodb.plt 1 4' in command line~nhave a nice day~n")))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;