all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Z572 via Guix-patches via <guix-patches@gnu.org>
To: 51441@debbugs.gnu.org
Subject: [bug#51441] [PATCH] substitutes: keep base's uri-path for Properly construct URL.
Date: Thu, 28 Oct 2021 00:37:52 +0800	[thread overview]
Message-ID: <tencent_58AC8EBF2E1DA972BC92AEDAB04D98D4BA07@qq.com> (raw)
Message-ID: <87fssmwhcc.fsf@qq.com> (raw)
In-Reply-To: <tencent_91AE3668F32215362BE62F45C7B6BCA02405@qq.com>


it just fix fetch narinfos url, substitute still don't download, later i
will try fix it.

Z572 via Guix-patches via <guix-patches@gnu.org> writes:

> Hello,
>
> Sorry for my english, and i'm not sure ChangeLog is right.
>
> https://mirror.sjtu.edu.cn/guix use customize script to mirror official
> substitutes server, at /guix not in /  . narinfo-request will forget add /guix to url, so i
> can't use substitutes from them, this patch fix it.
>
> From 7fe17965d5336d55ec8b1b7471cbbb34b12e9a0b Mon Sep 17 00:00:00 2001
> From: Z572 <873216071@qq.com>
> Date: Wed, 27 Oct 2021 21:28:24 +0800
> Subject: [PATCH] substitutes: keep base's uri-path for Properly construct URL.
>
> substitutes (narinfo-request): keep BASE's uri-path for properly construct url.
>
> some substitutes server don't use guix publish, them use customize scripts to
> mirror official server, if them look likes https://example.com/guix ,
> narinfo-request will lost /guix .
> ---
>  guix/substitutes.scm | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/guix/substitutes.scm b/guix/substitutes.scm
> index a5c554acff..bfbd29623e 100644
> --- a/guix/substitutes.scm
> +++ b/guix/substitutes.scm
> @@ -3,6 +3,7 @@
>  ;;; Copyright © 2014 Nikita Karetnikov <nikita@karetnikov.org>
>  ;;; Copyright © 2018 Kyle Meyer <kyle@kyleam.com>
>  ;;; Copyright © 2020 Christopher Baines <mail@cbaines.net>
> +;;; Copyright © 2021 Zheng Junjie <873216071@qq.com>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -158,7 +159,8 @@ (define (narinfo-request cache-url path)
>    "Return an HTTP request for the narinfo of PATH at CACHE-URL."
>    (let* ((base (string->uri cache-url))
>           (ref (build-relative-ref
> -               #:path (string-append (store-path-hash-part path) ".narinfo")))
> +               #:path (string-append (uri-path base) "/"
> +                                     (store-path-hash-part path) ".narinfo")))
>           (url (resolve-uri-reference ref base))
>           (headers '((User-Agent . "GNU Guile"))))
>      (build-request url #:method 'GET #:headers headers)))
> -- 
> 2.33.1


-- 
over




  reply	other threads:[~2021-10-27 17:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-27 13:53 [bug#51441] [PATCH] substitutes: keep base's uri-path for Properly construct URL Z572 via Guix-patches via
2021-10-27 16:37 ` Z572 via Guix-patches via [this message]
2021-10-27 16:37   ` Z572 via Guix-patches via
2021-10-29  1:48   ` Z572 via Guix-patches via
2021-10-29  4:18 ` Peng Mei Yu
2021-10-29  4:33   ` Z572 via Guix-patches via
2021-10-29  4:33     ` Z572 via Guix-patches via
2021-12-11 23:34   ` bug#51441: " Ludovic Courtès
2021-11-10 11:30 ` [bug#51441] " Zhu Zihao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tencent_58AC8EBF2E1DA972BC92AEDAB04D98D4BA07@qq.com \
    --to=guix-patches@gnu.org \
    --cc=51441@debbugs.gnu.org \
    --cc=873216071@qq.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.