From owner-freebsd-questions@FreeBSD.ORG Sun Aug 3 13:31:01 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8C591578 for ; Sun, 3 Aug 2014 13:31:01 +0000 (UTC) Received: from smtp.infracaninophile.co.uk (smtp6.infracaninophile.co.uk [IPv6:2001:8b0:151:1:3cd3:cd67:fafa:3d78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.infracaninophile.co.uk", Issuer "ca.infracaninophile.co.uk" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 1A5572EE0 for ; Sun, 3 Aug 2014 13:31:00 +0000 (UTC) Received: from seedling.black-earth.co.uk (seedling.black-earth.co.uk [81.2.117.99]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.9/8.14.9) with ESMTP id s73DUr61031293 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Sun, 3 Aug 2014 14:30:53 +0100 (BST) (envelope-from m.seaman@infracaninophile.co.uk) Authentication-Results: lucid-nonsense.infracaninophile.co.uk; dmarc=none header.from=infracaninophile.co.uk DKIM-Filter: OpenDKIM Filter v2.9.2 smtp.infracaninophile.co.uk s73DUr61031293 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=infracaninophile.co.uk; s=201001-infracaninophile; t=1407072653; bh=92qeAbalkWSkeC/R9t/yPENIpvR4obNC8cCRK5YLc1w=; h=Date:From:To:Subject:References:In-Reply-To; z=Date:=20Sun,=2003=20Aug=202014=2014:30:44=20+0100|From:=20Matthew =20Seaman=20|To:=20Wolfgang=20Huk riede=20,=20=0D=0A=20freebsd-questions@freebs d.org|Subject:=20Re:=20pkg:=20sqlite=20error=20while=20executing=2 0PRAGMA=20user_version|References:=20|In-Reply-To:=20; b=jgJ+b+WsUbkgIJAy+mry/BL64PYG3fNQkIxTT5wgCBdR3gNfLoVsVlszvhAXwHhWT +VLB1y0lpX56Ux+yUeQWSVUBGkdvR4xyeDe5N2BS9ruEMyBrrwfjXrtUb1+9593Z+n AAPKtQAcGjeBP+vSUwg/C5KJsXWuEVup3lStwalA= Message-ID: <53DE3984.1020405@infracaninophile.co.uk> Date: Sun, 03 Aug 2014 14:30:44 +0100 From: Matthew Seaman User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Wolfgang Hukriede , freebsd-questions@freebsd.org Subject: Re: pkg: sqlite error while executing PRAGMA user_version References: In-Reply-To: X-Enigmail-Version: 1.6 OpenPGP: id=E1ECF9BB Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="sRkTXgkwnUeKnQ3tRWlv9vimSLHeAlb3A" X-Virus-Scanned: clamav-milter 0.98.4 at lucid-nonsense.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lucid-nonsense.infracaninophile.co.uk X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Aug 2014 13:31:01 -0000 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--