~ chicken-core (chicken-5) b03666eb6568da16a947da9228daa4f5760e5d3b
commit b03666eb6568da16a947da9228daa4f5760e5d3b
Author: Evan Hanson <evhan@foldling.org>
AuthorDate: Wed Jul 25 20:08:52 2018 +1200
Commit: Peter Bex <peter@more-magic.net>
CommitDate: Sun Jul 29 19:56:46 2018 +0200
Fix remote version checking in chicken-install by resolving egg server names
Previously, the `check-remote-version' procedure would never expand egg
server aliases to their FQDNs, so its calls to `try-list-versions' would
always fail (because they'd be hitting, for example, "call-cc" and not
"code.call-cc.org"). Add location resolution to this procedure.
Also, pull the call to `resolve-location' in the `fetch-egg-sources'
procedure up into its loop initialisation, for consistency with the
other places in chicken-install.scm where we walk the server list.
Signed-off-by: Peter Bex <peter@more-magic.net>
diff --git a/chicken-install.scm b/chicken-install.scm
index e500dc4a..6d174d8c 100644
--- a/chicken-install.scm
+++ b/chicken-install.scm
@@ -458,7 +458,7 @@
(let loop ((locs default-locations))
(cond ((null? locs)
(let ((tmpdir (create-temporary-directory)))
- (let loop ((srvs default-servers))
+ (let loop ((srvs (map resolve-location default-servers)))
(if (null? srvs)
(if lax
(print "no connection to server or egg not found remotely - will use cached version")
@@ -469,7 +469,7 @@
(begin
(d "trying server ~a ...~%" (car srvs))
(receive (dir ver)
- (try-download name (resolve-location (car srvs))
+ (try-download name (car srvs)
version: version
destination: tmpdir
tests: #t ;; Always fetch tests, otherwise cached eggs can't be tested later
@@ -514,7 +514,7 @@
(define (check-remote-version name version lversion cached)
(let loop ((locs default-locations))
(cond ((null? locs)
- (let loop ((srvs default-servers))
+ (let loop ((srvs (map resolve-location default-servers)))
(and (pair? srvs)
(let ((versions (try-list-versions name (car srvs))))
(or (and versions
Trap