[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#32094] [PATCH] git: Call 'url-cache-directory' outside 'update-cach
From: |
Ludovic Courtès |
Subject: |
[bug#32094] [PATCH] git: Call 'url-cache-directory' outside 'update-cached-checkout' body. |
Date: |
Wed, 11 Jul 2018 12:01:45 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) |
Hi Oleg,
Oleg Pykhalov <address@hidden> skribis:
> address@hidden (Ludovic Courtès) writes:
>
>> Oleg Pykhalov <address@hidden> 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’.