From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ian Price Newsgroups: gmane.lisp.guile.devel Subject: Re: [PATCH] Guildhall: fix download path and keep connection alive Date: Sun, 04 Sep 2011 12:33:08 +0100 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: dough.gmane.org 1315136098 8552 80.91.229.12 (4 Sep 2011 11:34:58 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 4 Sep 2011 11:34:58 +0000 (UTC) Cc: guile-devel@gnu.org To: Nala Ginrut Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sun Sep 04 13:34:54 2011 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1R0AyU-0003BM-6H for guile-devel@m.gmane.org; Sun, 04 Sep 2011 13:34:54 +0200 Original-Received: from localhost ([::1]:41683 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R0AyT-0008Dz-NC for guile-devel@m.gmane.org; Sun, 04 Sep 2011 07:34:53 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:50279) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R0AyQ-0008Ds-T8 for guile-devel@gnu.org; Sun, 04 Sep 2011 07:34:51 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R0AyP-0004qA-Te for guile-devel@gnu.org; Sun, 04 Sep 2011 07:34:50 -0400 Original-Received: from mail-ww0-f49.google.com ([74.125.82.49]:38642) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R0AyP-0004q4-LD for guile-devel@gnu.org; Sun, 04 Sep 2011 07:34:49 -0400 Original-Received: by wwf10 with SMTP id 10so3484345wwf.30 for ; Sun, 04 Sep 2011 04:34:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=from:to:cc:subject:references:date:message-id:user-agent :mime-version:content-type; bh=Hc7DSuetvL6lfVKU12zBbDBRk5sbUI8D1nIK2yM0B+0=; b=M2j/KTk3KstMT30mELwUa2SDnDHScv9Kq+j1kHC2z3I37idRTPIj7g7MRk4ycu712C m1j4+Suihs28UGL6BaH1n5IcnKBcR/mEuK6ayGSI7mzSSTx43wxEzly/wHcfMwIIrW4M Wh56SDlWUCDsycvp99QzYjRlsaz25105aijWE= Original-Received: by 10.227.208.20 with SMTP id ga20mr776937wbb.10.1315136087831; Sun, 04 Sep 2011 04:34:47 -0700 (PDT) Original-Received: from Kagami.home (host109-154-209-241.range109-154.btcentralplus.com [109.154.209.241]) by mx.google.com with ESMTPS id e21sm4603754wbp.26.2011.09.04.04.34.46 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 04 Sep 2011 04:34:47 -0700 (PDT) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 74.125.82.49 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:12742 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Nala Ginrut writes: > hi guys! > I realized there're two problems in our shinning Guildhall.=C2=A0 > > 1. When "http-download" calls "relative-uri", the first arg should be a s= tring, 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? --=20 Ian Price "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled" --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-path-argument-to-relative-uri-should-be-a-list-of-st.patch Content-Description: Fix sigil downloads >From 63613aae434d502598a0a8d33368c8a6b4d3dfff Mon Sep 17 00:00:00 2001 From: Ian Price 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 --=-=-=--