From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 33100-done@debbugs.gnu.org
Subject: bug#33100: [libssh] fatal: dumb http transport does not support shallow capabilities
Date: Fri, 26 Oct 2018 22:05:52 -0400 [thread overview]
Message-ID: <878t2kuosf.fsf@gmail.com> (raw)
In-Reply-To: <87lg6musc4.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Thu, 25 Oct 2018 14:24:43 +0200")
[-- Attachment #1: Type: text/plain, Size: 823 bytes --]
Hello!
ludo@gnu.org (Ludovic Courtès) writes:
>>>> I like it, but it doesn't seem to actually print anything for me when I
>>>> trigger the failing case, for example by fetching the libssh source over
>>>> HTTP.
>>>
>>> If might be that current-output-port is fully buffered. What if you
>>> add:
>>>
>>> (setvbuf (current-output-port) 'line)
>>>
>>> before the ‘format’ call?
>>>
>>> Thanks,
>>> Ludo’, who is found guilty of not actually running the code.
>>
>> What is preferable, between your solution or using (force-output)?
>
> I’d go for line buffering since you only need to do it once for all.
I finally got around to reproducing the problem and testing the fix; it
was costly to build using --no-substitutes.
Is it OK to push this patch into master?
Thanks,
Maxim
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-git-download-Print-a-message-when-falling-back-to-a-.patch --]
[-- Type: text/x-patch, Size: 1173 bytes --]
From 44782db3f63a29cdbd98cddb77eab8a473806765 Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Wed, 24 Oct 2018 08:49:50 -0400
Subject: [PATCH] git-download: Print a message when falling back to a full
fetch.
Otherwise the user might believe that git-fetch stalled, observing the lack of
output following a 'fatal' git error message (see:
https://debbugs.gnu.org/33100).
* guix/build/git.scm (git-fetch): Print message when falling back to a full
fetch.
---
guix/build/git.scm | 2 ++
1 file changed, 2 insertions(+)
diff --git a/guix/build/git.scm b/guix/build/git.scm
index 14d415a6f..2d1700a9b 100644
--- a/guix/build/git.scm
+++ b/guix/build/git.scm
@@ -45,6 +45,8 @@ recursively. Return #t on success, #f otherwise."
(if (zero? (system* git-command "fetch" "--depth" "1" "origin" commit))
(invoke git-command "checkout" "FETCH_HEAD")
(begin
+ (setvbuf (current-output-port) 'line)
+ (format #t "Failed to do a shallow fetch; retrying a full fetch...~%")
(invoke git-command "fetch" "origin")
(invoke git-command "checkout" commit)))
(when recursive?
--
2.19.0
next prev parent reply other threads:[~2018-10-27 2:07 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-20 2:22 bug#33100: [libssh] fatal: dumb http transport does not support shallow capabilities Maxim Cournoyer
2018-10-20 14:05 ` Ludovic Courtès
2018-10-21 3:24 ` Maxim Cournoyer
2018-10-21 19:10 ` Leo Famulari
2018-10-21 21:42 ` Maxim Cournoyer
2018-10-22 9:55 ` Ludovic Courtès
2018-10-22 17:07 ` Leo Famulari
2018-10-24 13:01 ` Maxim Cournoyer
2018-10-24 14:11 ` Ludovic Courtès
2018-10-24 14:15 ` Leo Famulari
2018-10-24 21:33 ` Ludovic Courtès
2018-10-25 1:02 ` Leo Famulari
2018-10-25 1:44 ` Maxim Cournoyer
2018-10-25 12:24 ` Ludovic Courtès
2018-10-27 2:05 ` Maxim Cournoyer [this message]
2018-10-27 14:45 ` Ludovic Courtès
2018-10-29 2:45 ` Maxim Cournoyer
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=878t2kuosf.fsf@gmail.com \
--to=maxim.cournoyer@gmail.com \
--cc=33100-done@debbugs.gnu.org \
--cc=ludo@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).