Subject: Re: bug#66612: guix locate guild results in sqlite3 attempt to write readonly database

From: Ludovic Courtès <[email-masked]>
Date: Wed, 18 Oct 2023 17:54:54 +0200

Hi,

Matt Wette <[email-masked]> skribis:

> `guix locate guild' fails with attempt to write a readonly sqlite3 database
>
> mwette@bluefin$ strace -o logx guix locate guild
> guix locate: indexing files from /gnu/store...
> guix locate: traversing local profile manifests...

The bug here is that it picked the system-wide database:

  openat(AT_FDCWD, "/var/cache/guix/locate/db.sqlite", O_RDONLY|O_NOFOLLOW|O_CLOEXEC) = 14

but later decided that it was too old and that it needed to be
refreshed.  But of course, that file is read-only for unprivileged
users.

There’s a bug in the file-choosing logic.

To be continued…

Ludo’.