unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Oleg Pykhalov <go.wigust@gmail.com>
Cc: 32094@debbugs.gnu.org
Subject: [bug#32094] [PATCH] git: Call 'url-cache-directory' outside 'update-cached-checkout' body.
Date: Wed, 11 Jul 2018 12:01:45 +0200	[thread overview]
Message-ID: <87in5mnl9y.fsf@gnu.org> (raw)
In-Reply-To: <87efgbiwt1.fsf@gmail.com> (Oleg Pykhalov's message of "Tue, 10 Jul 2018 06:39:22 +0300")

Hi Oleg,

Oleg Pykhalov <go.wigust@gmail.com> skribis:

> ludo@gnu.org (Ludovic Courtès) writes:
>
>> Oleg Pykhalov <go.wigust@gmail.com> skribis:
>>
>>> * guix/git.scm (update-cached-checkout): Call 'url-cache-directory' in
>>> 'cache-directory' key argument.
>>
>> ‘latest-repository-commit’ would need to be adjusted accordingly.
>>
>> Could you do that and make sure ‘guix pull’ still behaves the same as
>> before?
>
> When I adjusted ‘latest-repository-commit’ I thought about removing
> ‘url-cache-directory’ call from ‘update-cached-checkout’ instead of
> moving ‘url-cache-directory’ call to ‘cache-directory’ argument.
>
> I'm not sure it's possible to call ‘url-cache-directory’ in argument of
> ‘update-cached-checkout’, because ‘url-cache-directory’ requires ‘url’
> argument which itself is the argument of ‘update-cached-checkout’.

Yes, you can do that:

(define* (update-cached-checkout url
                                 #:key
                                 (ref '(branch . "origin/master"))
                                 (cache-directory
                                  (url-cache-directory
                                   url (%repository-cache-directory))))
  …)                                 

(You’d get a warning about ‘url’ being unbound if it didn’t work.)

Could you make this last change?  And then I think we’re all set.

Thank you,
Ludo’.

  reply	other threads:[~2018-07-11 10:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-08 10:19 [bug#32094] [PATCH] git: Call 'url-cache-directory' outside 'update-cached-checkout' body Oleg Pykhalov
2018-07-08 10:24 ` Oleg Pykhalov
2018-07-09 14:43 ` Ludovic Courtès
2018-07-10  3:39   ` Oleg Pykhalov
2018-07-11 10:01     ` Ludovic Courtès [this message]
2018-07-13 13:26       ` bug#32094: " Oleg Pykhalov

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=87in5mnl9y.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=32094@debbugs.gnu.org \
    --cc=go.wigust@gmail.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 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).