* "guix pull" expiry channels
@ 2021-06-09 12:51 zimoun
2021-06-09 19:26 ` Pierre Neidhardt
2021-06-11 21:32 ` Ludovic Courtès
0 siblings, 2 replies; 8+ messages in thread
From: zimoun @ 2021-06-09 12:51 UTC (permalink / raw)
To: Guix Devel
Hi,
I do not know if it is not a bug. From f8acd1a (pulled April, 21rst), I get:
--8<---------------cut here---------------start------------->8---
Updating channel 'guix' from Git repository at
'https://git.savannah.gnu.org/git/guix.git'...
guix pull: error: Git error: failed to resolve path
'/home/simon/.cache/guix/checkouts/pjmkglp4t7znuugeurpurzikxq3tnlaywmisyr27shj7apsnalwq':
No such file or directory
--8<---------------cut here---------------end--------------->8---
Indeed, after the error, I have this:
--8<---------------cut here---------------start------------->8---
$ ls ~/.cache/guix/checkouts/
f5uvstgmyyeyhl66lla3yxbp26x25xwt7rbwah3kahh724xwzisa last-expiry-cleanup
--8<---------------cut here---------------end--------------->8---
Then if I run again "guix pull", it works as expected.
It is hard to reproduce. ;-) I suspect a bug in
'maybe-remove-expired-cache-entries' or 'update-cache-checkout'.
All the best,
simon
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: "guix pull" expiry channels
2021-06-09 12:51 "guix pull" expiry channels zimoun
@ 2021-06-09 19:26 ` Pierre Neidhardt
2021-06-10 8:48 ` zimoun
2021-06-11 21:10 ` Ludovic Courtès
2021-06-11 21:32 ` Ludovic Courtès
1 sibling, 2 replies; 8+ messages in thread
From: Pierre Neidhardt @ 2021-06-09 19:26 UTC (permalink / raw)
To: zimoun, Guix Devel
[-- Attachment #1: Type: text/plain, Size: 128 bytes --]
Same here, I've experienced this bug multiple times for a few months
already.
--
Pierre Neidhardt
https://ambrevar.xyz/
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 511 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: "guix pull" expiry channels
2021-06-09 19:26 ` Pierre Neidhardt
@ 2021-06-10 8:48 ` zimoun
2021-06-10 9:28 ` Pierre Neidhardt
2021-06-11 21:10 ` Ludovic Courtès
1 sibling, 1 reply; 8+ messages in thread
From: zimoun @ 2021-06-10 8:48 UTC (permalink / raw)
To: Pierre Neidhardt, Guix Devel
Hi Pierre,
On Wed, 09 Jun 2021 at 21:26, Pierre Neidhardt <mail@ambrevar.xyz> wrote:
> Same here, I've experienced this bug multiple times for a few months
> already.
Thanks for confirming. What is your frequency for pulling? More or
less?
Cheers,
simon
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: "guix pull" expiry channels
2021-06-10 8:48 ` zimoun
@ 2021-06-10 9:28 ` Pierre Neidhardt
0 siblings, 0 replies; 8+ messages in thread
From: Pierre Neidhardt @ 2021-06-10 9:28 UTC (permalink / raw)
To: zimoun, Guix Devel
[-- Attachment #1: Type: text/plain, Size: 140 bytes --]
Once every second week maybe?
Depends, if I need an urgent upgrade then it might be more.
--
Pierre Neidhardt
https://ambrevar.xyz/
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 511 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: "guix pull" expiry channels
2021-06-09 19:26 ` Pierre Neidhardt
2021-06-10 8:48 ` zimoun
@ 2021-06-11 21:10 ` Ludovic Courtès
1 sibling, 0 replies; 8+ messages in thread
From: Ludovic Courtès @ 2021-06-11 21:10 UTC (permalink / raw)
To: Pierre Neidhardt; +Cc: Guix Devel
Hi!
Pierre Neidhardt <mail@ambrevar.xyz> skribis:
> Same here, I've experienced this bug multiple times for a few months
> already.
Just so you know, bugs can be reported at bug-guix@gnu.org. :-)
I’m being provocative, but really it’s important to report such issues
so we can all be aware of them and start hunting them.
Ludo’.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: "guix pull" expiry channels
2021-06-09 12:51 "guix pull" expiry channels zimoun
2021-06-09 19:26 ` Pierre Neidhardt
@ 2021-06-11 21:32 ` Ludovic Courtès
2021-06-15 6:57 ` Pierre Neidhardt
2021-06-16 5:33 ` zimoun
1 sibling, 2 replies; 8+ messages in thread
From: Ludovic Courtès @ 2021-06-11 21:32 UTC (permalink / raw)
To: zimoun; +Cc: Guix Devel
[-- Attachment #1: Type: text/plain, Size: 1234 bytes --]
Hi,
zimoun <zimon.toutoune@gmail.com> skribis:
> I do not know if it is not a bug. From f8acd1a (pulled April, 21rst), I get:
>
> Updating channel 'guix' from Git repository at
> 'https://git.savannah.gnu.org/git/guix.git'...
> guix pull: error: Git error: failed to resolve path
> '/home/simon/.cache/guix/checkouts/pjmkglp4t7znuugeurpurzikxq3tnlaywmisyr27shj7apsnalwq':
> No such file or directory
>
>
> Indeed, after the error, I have this:
>
> $ ls ~/.cache/guix/checkouts/
> f5uvstgmyyeyhl66lla3yxbp26x25xwt7rbwah3kahh724xwzisa last-expiry-cleanup
>
> Then if I run again "guix pull", it works as expected.
>
> It is hard to reproduce. ;-) I suspect a bug in
> 'maybe-remove-expired-cache-entries' or 'update-cache-checkout'.
Sounds plausible!
The code in (guix git) determines expiration based on the mtime of
sub-directories in ~/.cache/guix/checkouts. But that’s bogus, no?
Yes, and the Internet confirms: a directory’s mtime is only changed when
a file inside it is renamed, added, or deleted.) Oops! So it would
depend on how frequently you pull, and perhaps on the file system you
use, go figure.
The patch below should fix it. Will push shortly, thank you!
Ludo’.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 740 bytes --]
diff --git a/guix/git.scm b/guix/git.scm
index 57fa2ca1ee..9c6f326c36 100644
--- a/guix/git.scm
+++ b/guix/git.scm
@@ -424,6 +424,14 @@ it unchanged."
;; REPOSITORY as soon as possible.
(repository-close! repository)
+ ;; Update CACHE-DIRECTORY's mtime to so the cache logic sees it.
+ (match (gettimeofday)
+ ((seconds . microseconds)
+ (let ((nanoseconds (* 1000 microseconds)))
+ (utime cache-directory
+ seconds seconds
+ nanoseconds nanoseconds))))
+
;; When CACHE-DIRECTORY is a sub-directory of the default cache
;; directory, remove expired checkouts that are next to it.
(let ((parent (dirname cache-directory)))
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: "guix pull" expiry channels
2021-06-11 21:32 ` Ludovic Courtès
@ 2021-06-15 6:57 ` Pierre Neidhardt
2021-06-16 5:33 ` zimoun
1 sibling, 0 replies; 8+ messages in thread
From: Pierre Neidhardt @ 2021-06-15 6:57 UTC (permalink / raw)
To: Ludovic Courtès, zimoun; +Cc: Guix Devel
[-- Attachment #1: Type: text/plain, Size: 63 bytes --]
Thanks a lot!
--
Pierre Neidhardt
https://ambrevar.xyz/
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 511 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: "guix pull" expiry channels
2021-06-11 21:32 ` Ludovic Courtès
2021-06-15 6:57 ` Pierre Neidhardt
@ 2021-06-16 5:33 ` zimoun
1 sibling, 0 replies; 8+ messages in thread
From: zimoun @ 2021-06-16 5:33 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: Guix Devel
Hi,
On Fri, 11 Jun 2021 at 23:32, Ludovic Courtès <ludo@gnu.org> wrote:
> The code in (guix git) determines expiration based on the mtime of
> sub-directories in ~/.cache/guix/checkouts. But that’s bogus, no?
>
> Yes, and the Internet confirms: a directory’s mtime is only changed when
> a file inside it is renamed, added, or deleted.) Oops! So it would
> depend on how frequently you pull, and perhaps on the file system you
> use, go figure.
Hehe! :-)
> diff --git a/guix/git.scm b/guix/git.scm
> index 57fa2ca1ee..9c6f326c36 100644
> --- a/guix/git.scm
> +++ b/guix/git.scm
> @@ -424,6 +424,14 @@ it unchanged."
> ;; REPOSITORY as soon as possible.
> (repository-close! repository)
>
> + ;; Update CACHE-DIRECTORY's mtime to so the cache logic sees it.
> + (match (gettimeofday)
> + ((seconds . microseconds)
> + (let ((nanoseconds (* 1000 microseconds)))
> + (utime cache-directory
> + seconds seconds
> + nanoseconds nanoseconds))))
> +
> ;; When CACHE-DIRECTORY is a sub-directory of the default cache
> ;; directory, remove expired checkouts that are next to it.
> (let ((parent (dirname cache-directory)))
LGTM.
Thanks for the quick fix. :-)
Cheers,
simon
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2021-06-16 5:37 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-09 12:51 "guix pull" expiry channels zimoun
2021-06-09 19:26 ` Pierre Neidhardt
2021-06-10 8:48 ` zimoun
2021-06-10 9:28 ` Pierre Neidhardt
2021-06-11 21:10 ` Ludovic Courtès
2021-06-11 21:32 ` Ludovic Courtès
2021-06-15 6:57 ` Pierre Neidhardt
2021-06-16 5:33 ` zimoun
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).