emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#32094: closed ([PATCH] git: Call 'url-cache-direct


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#32094: closed ([PATCH] git: Call 'url-cache-directory' outside 'update-cached-checkout' body.)
Date: Fri, 13 Jul 2018 13:27:02 +0000

Your message dated Fri, 13 Jul 2018 16:26:27 +0300
with message-id <address@hidden>
and subject line Re: [bug#32094] [PATCH] git: Call 'url-cache-directory' 
outside 'update-cached-checkout' body.
has caused the debbugs.gnu.org bug report #32094,
regarding [PATCH] git: Call 'url-cache-directory' outside 
'update-cached-checkout' body.
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
32094: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=32094
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: [PATCH] git: Call 'url-cache-directory' outside 'update-cached-checkout' body. Date: Sun, 8 Jul 2018 13:19:35 +0300
* guix/git.scm (update-cached-checkout): Call 'url-cache-directory' in
'cache-directory' key argument.
---
 guix/git.scm | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/guix/git.scm b/guix/git.scm
index 9e89cc006..c5912170b 100644
--- a/guix/git.scm
+++ b/guix/git.scm
@@ -114,7 +114,8 @@ OID (roughly the commit hash) corresponding to REF."
                                  #:key
                                  (ref '(branch . "origin/master"))
                                  (cache-directory
-                                  (%repository-cache-directory)))
+                                  (url-cache-directory
+                                   (%repository-cache-directory))))
   "Update the cached checkout of URL to REF in CACHE-DIRECTORY.  Return two
 values: the cache directory name, and the SHA1 commit (a string) corresponding
 to REF.
@@ -122,11 +123,10 @@ to REF.
 REF is pair whose key is [branch | commit | tag] and value the associated
 data, respectively [<branch name> | <sha1> | <tag name>]."
   (with-libgit2
-   (let* ((cache-dir     (url-cache-directory url cache-directory))
-          (cache-exists? (openable-repository? cache-dir))
+   (let* ((cache-exists? (openable-repository? cache-directory))
           (repository    (if cache-exists?
-                             (repository-open cache-dir)
-                             (clone* url cache-dir))))
+                             (repository-open cache-directory)
+                             (clone* url cache-directory))))
      ;; Only fetch remote if it has not been cloned just before.
      (when cache-exists?
        (remote-fetch (remote-lookup repository "origin")))
@@ -138,7 +138,7 @@ data, respectively [<branch name> | <sha1> | <tag name>]."
                               'repository-close!)
          (repository-close! repository))
 
-       (values cache-dir (oid->string oid))))))
+       (values cache-directory (oid->string oid))))))
 
 (define* (latest-repository-commit store url
                                    #:key
-- 
2.18.0




--- End Message ---
--- Begin Message --- Subject: Re: [bug#32094] [PATCH] git: Call 'url-cache-directory' outside 'update-cached-checkout' body. Date: Fri, 13 Jul 2018 16:26:27 +0300 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)
Hello Ludovic,

address@hidden (Ludovic Courtès) writes:

[…]

>> 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.)

Ah, thank you for pointing it out.

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

OK, added.  I tested second time successfully with:
--8<---------------cut here---------------start------------->8---
./pre-inst-env env GUIX_PACKAGE_PATH= guix pull
--8<---------------cut here---------------end--------------->8---

Pushed as ffc3fcade3f7d2c7d26b2fe5245902e6407f9c93

Thanks,
Oleg.

Attachment: signature.asc
Description: PGP signature


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]