Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 03 Aug 2014 14:30:44 +0100
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        Wolfgang Hukriede <whukriede@gmail.com>, freebsd-questions@freebsd.org
Subject:   Re: pkg: sqlite error while executing PRAGMA user_version
Message-ID:  <53DE3984.1020405@infracaninophile.co.uk>
In-Reply-To: <n888un5vhx2.fsf@almelo.raji.xor>
References:  <n888un5vhx2.fsf@almelo.raji.xor>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--sRkTXgkwnUeKnQ3tRWlv9vimSLHeAlb3A
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On 03/08/2014 14:09, Wolfgang Hukriede wrote:
> Matthew Seaman wrote:
>=20
>   # pkg shell
>   SQLite version 3.8.5 2014-06-04 14:06:34
>   Enter ".help" for usage hints.
>   sqlite> select * from pkg_lock ;
>   0|0|0
>   sqlite> select * from pkg_lock_pid ;
>   sqlite> .quit
>=20
> Yes, this is what I get.
>=20
> In the meantime I discovered that "pkg info" works on the diskless box
> when invoked as root. I then tried "pkg upgrade -n" and "pkg upgrade".
> This worked after some contortions. (It first said "locked", while
> the second or third attempt was ok.)
>=20
> Becoming somewhat more confident I tried a "pkg delete nnn", but
> interrupted that with control-c. This seems to have been a mistake,
> because now I get "database is locked" consistently and nothing works,
> while output for "select * from pkg_lock" is "1|1|0" and "select *
> from pkg_lock_pid" returns a number (A pid? But there's no process
> with that pid).
>=20
> Any way to remove to lock?=20

OK.  This is unsupported and requires you to run SQL commands manually
directly against your local package DB.  Fat-finger this and you can
cause catastrophic results.  Use at your own risk.  Slippery when wet.
Beware of dog.

Backup your database first.

# pkg shell
SQLite version 3.8.5 2014-06-04 14:06:34
Enter ".help" for usage hints.
sqlite> update pkg_lock set exclusive=3D0,advisory=3D0,read=3D0 ;
sqlite> select * from pkg_lock ;
0|0|0
sqlite> delete from pkg_lock_pid ;
sqlite> select * from pkg_lock_pid ;
sqlite> .quit

We offer no guarantees that the sqlite schema will remain compatible in
any future version of pkg(8).  The locking system in particular has been
seen to be in need of attention after recent pkg(8) releases.

Good luck.

	Cheers,

	Matthew

--=20
Dr Matthew J Seaman MA, D.Phil.

PGP: http://www.infracaninophile.co.uk/pgpkey
JID: matthew@infracaninophile.co.uk


--sRkTXgkwnUeKnQ3tRWlv9vimSLHeAlb3A
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.20 (Darwin)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQJ8BAEBCgBmBQJT3jmNXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2NTNBNjhCOTEzQTRFNkNGM0UxRTEzMjZC
QjIzQUY1MThFMUE0MDEzAAoJELsjr1GOGkATm+wQAIV4k1tEA6SWm6CSkg6h4EsR
MhZ/uy9e1k4wdmTLlnm/J3P0KZD8OF6DVHcSRBZFlpbLC5pKmGvTQZzD9U5l3n4V
SS3yct8+qRNnJ4OXdM6dJZ7VDpY7azYKjlaY4mYkBMoQNwgLAlrLvANmFhN8J0Rb
rWtkXmWD+tW/m2c2HtS5Z4JJg1ioZWGZhsBr1TuUx7WUmiXyw3AB+fSZLVE+Mdcq
3HKcrnGNjONPkGqz2GWZrcQ5RZ8EHnorP6xGHEEIcS4i/Res27tcCKJdIBd2yCt4
039OVn8mXB9pHAhxdLBOoGSm7FUq4w7b4MK7h4rGutIhysrp/AcSL2kV0YE/Ua3V
sW1BX+IyLKYYcYifC5ZUwv7cUjAB5TZQ075ewE5MNbp7I7as+TVVSJORd/8DMxmf
LnSPjBxC0mDF4inkRiwYhb4OO9zx4C3OAILEH38+VSref9ctSB2zF9Se18PlaBhc
ulyPAdMGAaswC/EgZo9i4z8/DIRWZci2JOGaZb7C1zhsyIYoDL1/VPBDbpsNztDH
WqfgtiNk0k7jV12dBlubp6d8JfM0zsJBf68JC2tt0sq92u5EAZXPlpiHq+3L3gwv
tFmx7TjXrLZF2kBsnwtnpFMKVILikNd93jzL80CU9bq8KAEn2zTk+9AOSjshD1hp
pJtz3Qe+ox45o2veO2CS
=4gYk
-----END PGP SIGNATURE-----

--sRkTXgkwnUeKnQ3tRWlv9vimSLHeAlb3A--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?53DE3984.1020405>