guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Guildhall: fix download path and keep connection alive


From: Ian Price
Subject: Re: [PATCH] Guildhall: fix download path and keep connection alive
Date: Sun, 04 Sep 2011 12:33:08 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

Nala Ginrut <address@hidden> writes:

> hi guys!
> I realized there're two problems in our shinning Guildhall. 
>
> 1. When "http-download" calls "relative-uri", the first arg should be a 
> string, say "srfi", but ("srfi").

I don't see a reply to this issue like there is for the other, and it
isn't fixed in gitorious yet, so I thought I'd weigh in.

The root cause of this problem are the
  (location ("wak-syn-param-20110103.zip"))
entries in the file 'available.scm'. Judging by the rest of
dorodango/sigil, this means that the file may be in an arbitrary
subdirectory i.e. ("foo" "bar" "baz.zip"), and so just doing 'car' isn't
going to cut it.

I think a better solution is to
a) Change the 'location' format to be a string only, this entails
changes to a few procedures that add location properties to
packages. I'm not sure if getting rid of the subdirs is desirable (it
might be), but changing the format is still feasible since doro/sigil
isn't in widespread use yet.
or
b) fix 'relative-uri' to take a list of paths, which matches the current
format of locations.

I went for the latter, but what do you think?

-- 
Ian Price

"Programming is like pinball. The reward for doing it well is
the opportunity to do it again" - from "The Wizardy Compiled"
>From 63613aae434d502598a0a8d33368c8a6b4d3dfff Mon Sep 17 00:00:00 2001
From: Ian Price <address@hidden>
Date: Sun, 4 Sep 2011 01:40:54 +0100
Subject: [PATCH] path argument to relative-uri should be a list of strings

---
 sigil/repository.scm |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sigil/repository.scm b/sigil/repository.scm
index 8261144..3a9e713 100644
--- a/sigil/repository.scm
+++ b/sigil/repository.scm
@@ -108,13 +108,13 @@
                      "/"
                      (encode-and-join-uri-path
                       (append (split-and-decode-uri-path (uri-path rel))
-                              (split-and-decode-uri-path path))))))
+                              path)))))
 
 (define (make-http-repository name uri-string)
   (let* ((base-uri (uri-with-directory-path
                     (or (string->uri uri-string)
                         (error "bad URI string" uri-string))))
-         (available-uri (relative-uri "available.scm" base-uri))
+         (available-uri (relative-uri '("available.scm") base-uri))
          (available-filename "available.scm"))
     (make-repository
      name
-- 
1.7.6


reply via email to

[Prev in Thread] Current Thread [Next in Thread]