Date: Sun, 03 Aug 2014 16:23:54 +0200 From: Wolfgang Hukriede <whukriede@gmail.com> To: freebsd-questions@freebsd.org Subject: Re: pkg: sqlite error while executing PRAGMA user_version Message-ID: <n88oaw1wt1h.fsf@almelo.raji.xor>
next in thread | raw e-mail | index | archive | help
That was only partly sufficient. No way to backup the database: # pkg backup -d /var/db/pkg/db-backup pkg: sqlite error while executing PRAGMA user_version; in file pkgdb.c:2284: database is locked Ok, leave that for later... Continue with # pkg shell SQLite version 3.8.5 2014-06-04 14:06:34 Enter ".help" for usage hints. sqlite> update pkg_lock set exclusive=0,advisory=0,read=0 ; sqlite> select * from pkg_lock ; 0|0|0 sqlite> delete from pkg_lock_pid ; sqlite> select * from pkg_lock_pid ; sqlite> .quit Okay, but still: # pkg info pkg: sqlite error while executing PRAGMA user_version; in file pkgdb.c:2284: database is locked I then removed local.sqlite.lock/ by hand. Good, "pkg info" works again! Then I tried to relax permissions on /var/db/pkg with the idea to make "pkg info" work for non-root users. "pkg" nicely detects and defeats this: > pkg info pkg: /var/db/pkg permissions (0775) too lax So, that's impossible. Anyways, I seem to remember that NFS lockfiles should go to /tmp/ or /var/tmp/ ? Many thanks!
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?n88oaw1wt1h.fsf>