diff --git a/collects/planet2/lib.rkt b/collects/planet2/lib.rkt index 8aa4b352ec..745c45c52b 100644 --- a/collects/planet2/lib.rkt +++ b/collects/planet2/lib.rkt @@ -401,7 +401,7 @@ (define (install-package pkg given-type given-pkg-name - #:given-checksum [given-checksum #f]) + #:given-checksum [given-checksum #f]) (define-values (inferred-pkg-name type) (if (path? pkg) (package-source->name+type (path->string pkg) @@ -420,7 +420,7 @@ (not (regexp-match? #rx"^github://" pkg))) ;; Add "github://github.com/" (install-package (string-append "github://github.com/" pkg) type - pkg-name)] + pkg-name #:given-checksum given-checksum)] [(or (eq? type 'file-url) (eq? type 'dir-url) (eq? type 'github)) (define pkg-url (string->url pkg)) (define scheme (url-scheme pkg-url)) diff --git a/collects/planet2/name.rkt b/collects/planet2/name.rkt index f7d2ab1ad0..aae68783fe 100644 --- a/collects/planet2/name.rkt +++ b/collects/planet2/name.rkt @@ -67,7 +67,7 @@ (if (= (length p) 3) (path/param-path (second (reverse p))) (path/param-path (last-non-empty p)))))))) - (values name (or type (and name 'github)))] + (values name (or type 'github))] [(if type (eq? type 'file-url) (and (pair? p) @@ -78,7 +78,7 @@ [else (values (validate-name (path/param-path (last-non-empty p))) 'dir-url)])) (values #f #f))) - (values (validate-name name) (or type (and name name-type)))] + (values (validate-name name) (or type (and name-type)))] [(and (not type) (regexp-match? #rx"^[a-zA-Z]*://" s)) (values #f #f)] diff --git a/collects/tests/planet2/tests-name.rkt b/collects/tests/planet2/tests-name.rkt index d36f7e18fc..80d30b52f1 100644 --- a/collects/tests/planet2/tests-name.rkt +++ b/collects/tests/planet2/tests-name.rkt @@ -54,6 +54,7 @@ (check-equal-values? (package-source->name+type "http://racket-lang.org/fish" #f) (values "fish" 'dir-url)) (check-equal-values? (package-source->name+type "github://github.com/racket/fish/master" #f) (values "fish" 'github)) + (check-equal-values? (package-source->name+type "github://github.com/racket/fish.rkt/master" #f) (values #f 'github)) (check-equal-values? (package-source->name+type "github://github.com/racket/fish/release" #f) (values "fish" 'github)) (check-equal-values? (package-source->name+type "github://github.com/racket/fish/release/catfish" #f) (values "catfish" 'github)) (check-equal-values? (package-source->name+type "github://github.com/racket/fish/release/catfish/" #f) (values "catfish" 'github))