unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: 44593@debbugs.gnu.org
Subject: bug#44593: (guix git) doesn’t honor HTTP/HTTPS proxy settings for submodules
Date: Fri, 02 Apr 2021 11:56:20 +0200	[thread overview]
Message-ID: <87v9952env.fsf@gnu.org> (raw)
In-Reply-To: <87wnvvhjfr.fsf@gnu.org> ("Ludovic Courtès"'s message of "Fri, 29 Jan 2021 16:06:00 +0100")

[-- Attachment #1: Type: text/plain, Size: 697 bytes --]

Ludovic Courtès <ludovic.courtes@inria.fr> skribis:

> Ludovic Courtès <ludovic.courtes@inria.fr> skribis:
>
>> (guix git) does not honor proxy settings when fetching submodules.
>>
>> In fact, Guile-Git 0.4.0 doesn’t allow us to pass fetch options to
>> ‘submodule-update’, which is what needs to be fixed first.
>
> Implemented here:
>
>   https://gitlab.com/guile-git/guile-git/-/commit/6c512f7a4d14814a306b9c97b53373527d9a6c50
>
> Unfortunately I couldn’t come up with a good test to ensure the fetch
> options are honored by ‘submodule-update’, as noted there.

And here’s the (guix git) patch, to commit when the new Guile-Git
release is out.

Ludo’.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 1857 bytes --]

diff --git a/guix/git.scm b/guix/git.scm
index 1820036f25..ed00a50df9 100644
--- a/guix/git.scm
+++ b/guix/git.scm
@@ -279,13 +279,15 @@ dynamic extent of EXP."
       (report-git-error err))))
 
 (define* (update-submodules repository
-                            #:key (log-port (current-error-port)))
+                            #:key (log-port (current-error-port))
+                            (fetch-options #f))
   "Update the submodules of REPOSITORY, a Git repository object."
   (for-each (lambda (name)
               (let ((submodule (submodule-lookup repository name)))
                 (format log-port (G_ "updating submodule '~a'...~%")
                         name)
-                (submodule-update submodule)
+                (submodule-update submodule
+                                  #:fetch-options fetch-options)
 
                 ;; Recurse in SUBMODULE.
                 (let ((directory (string-append
@@ -293,6 +295,7 @@ dynamic extent of EXP."
                                   "/" (submodule-path submodule))))
                   (with-repository directory repository
                     (update-submodules repository
+                                       #:fetch-options fetch-options
                                        #:log-port log-port)))))
             (repository-submodules repository)))
 
@@ -391,7 +394,8 @@ it unchanged."
        (remote-fetch (remote-lookup repository "origin")
                      #:fetch-options (make-default-fetch-options)))
      (when recursive?
-       (update-submodules repository #:log-port log-port))
+       (update-submodules repository #:log-port log-port
+                          #:fetch-options (make-default-fetch-options)))
 
      ;; Note: call 'commit-relation' from here because it's more efficient
      ;; than letting users re-open the checkout later on.

  reply	other threads:[~2021-04-02  9:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-12 14:01 bug#44593: (guix git) doesn’t honor HTTP/HTTPS proxy settings for submodules Ludovic Courtès
2021-01-29 15:06 ` Ludovic Courtès
2021-04-02  9:56   ` Ludovic Courtès [this message]
2021-04-14 20:52     ` Ludovic Courtès

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=87v9952env.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=44593@debbugs.gnu.org \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).