<feed xmlns='http://www.w3.org/2005/Atom'>
<title>guix/tests/cache.scm, branch master</title>
<subtitle>Transactional package manager, declarative GNU/Linux distribution, reproducible deployment tool, and more! https://guix.gnu.org</subtitle>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/'/>
<entry>
<title>cache: Avoid cache cleanup storms from concurrent processes.</title>
<updated>2024-08-20T22:52:39+00:00</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2024-07-16T09:03:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=d921c742b774a9f0a016f3db6442d5c58a330c92'/>
<id>d921c742b774a9f0a016f3db6442d5c58a330c92</id>
<content type='text'>
Reported by Christopher Baines &lt;guix@cbaines.net&gt;.

* guix/cache.scm (maybe-remove-expired-cache-entries): Define
‘expiry-port’; create it with ‘lock-file’.  Change ‘last-expiry-date’
accordingly.  Write timestamp straight to ‘expiry-port’.
* tests/cache.scm ("maybe-remove-expired-cache-entries, cleanup needed
but lock taken"): New test.

Change-Id: I22441d9d2c4a339d3d3878de131864db5a0ae826
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reported by Christopher Baines &lt;guix@cbaines.net&gt;.

* guix/cache.scm (maybe-remove-expired-cache-entries): Define
‘expiry-port’; create it with ‘lock-file’.  Change ‘last-expiry-date’
accordingly.  Write timestamp straight to ‘expiry-port’.
* tests/cache.scm ("maybe-remove-expired-cache-entries, cleanup needed
but lock taken"): New test.

Change-Id: I22441d9d2c4a339d3d3878de131864db5a0ae826
</pre>
</div>
</content>
</entry>
<entry>
<title>cache: Catch invalid 'last-expiry-cleanup'.</title>
<updated>2022-06-04T10:04:23+00:00</updated>
<author>
<name>zimoun</name>
<email>zimon.toutoune@gmail.com</email>
</author>
<published>2022-05-30T13:07:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=104b4e25ab7da5697f2f6f1ddfdd4955f05afece'/>
<id>104b4e25ab7da5697f2f6f1ddfdd4955f05afece</id>
<content type='text'>
Fixes &lt;http://issues.guix.gnu.org/55638&gt;.

* guix/cache.scm (maybe-remove-expired-cache-entries)[last-expiry-date]:
Use 'get-string-all' + 'string-&gt;number' instead of 'read'; ignore
invalid numbers.
* tests/cache.scm ("maybe-remove-expired-cache-entries, empty cache")
("maybe-remove-expired-cache-entries, corrupted cache"): New tests.

Co-authored-by: Ludovic Courtès &lt;ludo@gnu.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes &lt;http://issues.guix.gnu.org/55638&gt;.

* guix/cache.scm (maybe-remove-expired-cache-entries)[last-expiry-date]:
Use 'get-string-all' + 'string-&gt;number' instead of 'read'; ignore
invalid numbers.
* tests/cache.scm ("maybe-remove-expired-cache-entries, empty cache")
("maybe-remove-expired-cache-entries, corrupted cache"): New tests.

Co-authored-by: Ludovic Courtès &lt;ludo@gnu.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove workaround for 'time-monotonic' in Guile 2.2.2.</title>
<updated>2020-03-22T15:49:47+00:00</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2020-03-22T14:58:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=9acacb71c958218fd69cf0fb9df0b439a980a0f2'/>
<id>9acacb71c958218fd69cf0fb9df0b439a980a0f2</id>
<content type='text'>
This is a followup to e688c2df3924423b67892cc9939ca099c729d1cb.

* build-aux/hydra/evaluate.scm &lt;top level&gt;: Remove 'time-monotonic'
definition.
* guix/cache.scm: Likewise.
* guix/progress.scm: Likewise.
* guix/scripts/substitute.scm: Likewise.
* guix/scripts/weather.scm: Likewise.
* tests/cache.scm: Likewise.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a followup to e688c2df3924423b67892cc9939ca099c729d1cb.

* build-aux/hydra/evaluate.scm &lt;top level&gt;: Remove 'time-monotonic'
definition.
* guix/cache.scm: Likewise.
* guix/progress.scm: Likewise.
* guix/scripts/substitute.scm: Likewise.
* guix/scripts/weather.scm: Likewise.
* tests/cache.scm: Likewise.
</pre>
</div>
</content>
</entry>
<entry>
<title>cache: Work around 'time-monotonic' bug in Guile 2.2.2.</title>
<updated>2017-04-22T12:42:15+00:00</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2017-04-22T12:40:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=25a49294caf2386e65fc1b12a2508324be0b1cc2'/>
<id>25a49294caf2386e65fc1b12a2508324be0b1cc2</id>
<content type='text'>
* guix/cache.scm (time-monotonic) [guile-2.2]: New variable.
* tests/cache.scm (time-monotonic) [guile-2.2]: Likewise.
* guix/build/download.scm (time-monotonic) [guile-2.2]: Adjust comment:
it's a 2.2.2 bug.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* guix/cache.scm (time-monotonic) [guile-2.2]: New variable.
* tests/cache.scm (time-monotonic) [guile-2.2]: Likewise.
* guix/build/download.scm (time-monotonic) [guile-2.2]: Adjust comment:
it's a 2.2.2 bug.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add (guix cache) and use it in (guix scripts substitute).</title>
<updated>2017-04-18T21:19:30+00:00</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2017-04-18T20:07:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=2ea2aac6e9d58a07c029504f94fb5015cd407e31'/>
<id>2ea2aac6e9d58a07c029504f94fb5015cd407e31</id>
<content type='text'>
* guix/cache.scm, tests/cache.scm: New files.
* Makefile.am (MODULES, SCM_TESTS): Add them.
* guix/scripts/substitute.scm (obsolete?): Remove.
(remove-expired-cached-narinfos): Rename to...
(cached-narinfo-expiration-time): ... this.  Remove the removal part and
only keep the expiration time part.
(narinfo-cache-directories): Add optional 'directory' parameter and
honor it.
(maybe-remove-expired-cached-narinfo): Remove.
(cached-narinfo-files): New procedure.
(guix-substitute): Use 'maybe-remove-expired-cache-entries' instead of
'maybe-remove-expired-cached-narinfo'.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* guix/cache.scm, tests/cache.scm: New files.
* Makefile.am (MODULES, SCM_TESTS): Add them.
* guix/scripts/substitute.scm (obsolete?): Remove.
(remove-expired-cached-narinfos): Rename to...
(cached-narinfo-expiration-time): ... this.  Remove the removal part and
only keep the expiration time part.
(narinfo-cache-directories): Add optional 'directory' parameter and
honor it.
(maybe-remove-expired-cached-narinfo): Remove.
(cached-narinfo-files): New procedure.
(guix-substitute): Use 'maybe-remove-expired-cache-entries' instead of
'maybe-remove-expired-cached-narinfo'.
</pre>
</div>
</content>
</entry>
</feed>
