From owner-freebsd-ports@FreeBSD.ORG Sun Oct 13 19:41:50 2013 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 06FD67DC for ; Sun, 13 Oct 2013 19:41:50 +0000 (UTC) (envelope-from matthew@FreeBSD.org) 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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7FCE223E1 for ; Sun, 13 Oct 2013 19:41:49 +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.7/8.14.7) with ESMTP id r9DJfid5090298 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO) for ; Sun, 13 Oct 2013 20:41:44 +0100 (BST) (envelope-from matthew@FreeBSD.org) DKIM-Filter: OpenDKIM Filter v2.8.3 smtp.infracaninophile.co.uk r9DJfid5090298 Authentication-Results: smtp.infracaninophile.co.uk/r9DJfid5090298; dkim=none reason="no signature"; dkim-adsp=none (unprotected policy) Message-ID: <525AF770.4090307@FreeBSD.org> Date: Sun, 13 Oct 2013 20:41:36 +0100 From: Matthew Seaman User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:24.0) Gecko/20100101 Thunderbird/24.0.1 MIME-Version: 1.0 To: freebsd-ports@freebsd.org Subject: Re: pkg: sqlite: database disk image is malformed (pkgdb.c:1274) References: <201310131924.r9DJO0GA005315@mech-cluster241.men.bris.ac.uk> In-Reply-To: <201310131924.r9DJO0GA005315@mech-cluster241.men.bris.ac.uk> X-Enigmail-Version: 1.5.2 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="95iXTQ28rxqEWClKj7HwnDNEHBAb0F2bC" X-Virus-Scanned: clamav-milter 0.97.8 at lucid-nonsense.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on lucid-nonsense.infracaninophile.co.uk X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Oct 2013 19:41:50 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --95iXTQ28rxqEWClKj7HwnDNEHBAb0F2bC Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 13/10/2013 20:24, Anton Shterenlikht wrote: > My box crashed during "pkg upgrade". > On reboot I get: >=20 > # pkg update > Updating repository catalogue > pkg: sqlite: database disk image is malformed (pkgdb.c:1274) > # >=20 > What's broken? > And how can I recover? Not sure exactly what's broken, but you can usually recover by: rm /var/db/pkg/repo-*.sqlite and then use pkg as normal. It's safe to delete the repo sqlite files as all the information in them comes from the repository catalogues and can be regenerated from source as desired. Failing that, there should be a nightly backup in /var/backups/pkgdb.bak.tbz but that can be up to a day old, so be prepared to redo any package updates from the day in order to resynch it with what's on the filesystem. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. PGP: http://www.infracaninophile.co.uk/pgpkey --95iXTQ28rxqEWClKj7HwnDNEHBAb0F2bC 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/ iQJ8BAEBCgBmBQJSWvd4XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2NTNBNjhCOTEzQTRFNkNGM0UxRTEzMjZC QjIzQUY1MThFMUE0MDEzAAoJELsjr1GOGkATdYEQAKdmkEsnC8X7zGifJjCK7tYW 3und5QFJHOvYeqH6U+5Ja/Ry3kLk+U5/7cF6CY7wuVeJdHQFjLdrQ8IfDVGkQAOx 9FUGbg6PRcDg165Nadjj00ytuo4X46hugiDiMvP4+Y1FCGZKEK4pUwmBkt9B4k6o Hxbky6UKjF4neU5tvpb6QDYf0qD63DyvZCk8T9GxIFrDpD8z9fu4S8er0WFOg//A nHIB1phDszeJ/thhc0TbbUkyuR0cQzrOEk7eu9/1kvXBMrtrJxjRBGwKMd4xR7Hz j/zrnIKZ1bDwxWi7B8cDWD37G8wREMytDE8y2xBQ8UydyEuZr2YIgOZhDzf9cFen nNDdznknGmmugsVTg5dLzslzxNfRDfd7tjC68DzE48K6TfT5vgo9fwR09D18rXm9 kQhPjcLYO6MBN+pe6o8nIInFDTOlfmPwc6s+R/5/kPVSTBmJrZMcZXNNyIjoa9JI RYQrrpa4QCkfcrentmu9Is8De/6FP0YzSUB/yZyXMcg+/B31YKiJDyn6RcdPzKEF Ay+5/JQt22X48rFiPI2acUUR/IYtAl0HQcp1O5Ui3nnM88py5cZSXeu4dqIj5nyx z29R/gK+AR42eR08cYX04D+VYiXPp+4BpJBqg+JHP7xObnBG9/izqiPoTjIdVbH+ +tG4ylnaUplLZupOQF1p =IbgL -----END PGP SIGNATURE----- --95iXTQ28rxqEWClKj7HwnDNEHBAb0F2bC--