From owner-freebsd-questions@FreeBSD.ORG Sat Mar 30 08:38:16 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 2A5D2532 for ; Sat, 30 Mar 2013 08:38:16 +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]) by mx1.freebsd.org (Postfix) with ESMTP id B4B847B4 for ; Sat, 30 Mar 2013 08:38:15 +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.6/8.14.6) with ESMTP id r2U8cBCL004156 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO) for ; Sat, 30 Mar 2013 08:38:11 GMT (envelope-from matthew@FreeBSD.org) DKIM-Filter: OpenDKIM Filter v2.8.0 smtp.infracaninophile.co.uk r2U8cBCL004156 Authentication-Results: smtp.infracaninophile.co.uk/r2U8cBCL004156; dkim=none reason="no signature"; dkim-adsp=none (unprotected policy) Message-ID: <5156A473.4030501@FreeBSD.org> Date: Sat, 30 Mar 2013 08:38:11 +0000 From: Matthew Seaman User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:17.0) Gecko/20130307 Thunderbird/17.0.4 MIME-Version: 1.0 To: freebsd-questions@freebsd.org Subject: Re: Ah crap! pkg_version: the package info for package '...' is corrupt References: <10944.1364631449@server1.tristatelogic.com> In-Reply-To: <10944.1364631449@server1.tristatelogic.com> X-Enigmail-Version: 1.5.1 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="----enig2OOQAASWDJRKSNFOVRREN" X-Virus-Scanned: clamav-milter 0.97.6 at lucid-nonsense.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00,SPF_SOFTFAIL autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on lucid-nonsense.infracaninophile.co.uk X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Mar 2013 08:38:16 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2OOQAASWDJRKSNFOVRREN Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 30/03/2013 08:17, Ronald F. Guilmette wrote: >=20 >=20 > Today my system crashed twice while I was doing "portupgrade -a". >=20 > I'm not sure but I suspect the new cards I have installed recently may > just be a bit too much for the old power supply I have. (When the thin= g > crashed, the machine just simply shut itself off. This exact same thin= g > has also happened a couple of other times in the past week.) >=20 > I'll deal with the power issue soon, but right now I am more worried ab= out > this new, different, and additional problem I seem to have created for > myself. When I run pkg_version, I am getting a bunch of messages of > the following general form: >=20 > pkg_version: the package info for package 'PKG' is corrupt >=20 > where `PKG' is the name of some package or another that I have installe= d. >=20 > I have at least 6 such messages for different packages I have installed= =2E.. > and probably more. Are you using pkgng? If so, you'll get the "'PKG' is corrupt" message for everything when you use pkg_version. That's because on a pkgng-ized you should instead be using 'pkg version'. Same command flags, just s/_/ /. > I googled around a bit and did not find any good explanation for the > above error or, more importantly, what to do about it. >=20 > I gather however that my package data base has become corrupted. >=20 > OK, so how does one rebuild that from scratch? >=20 > Please don't tell me that I have to reinstall every bleedin' port from > scratch! >=20 >=20 > Regards, > rfg >=20 >=20 > P.S. Oh! I just remembered. I made a full system backup quite recent= ly... > thank god. Do I just simply need to get the entire contents of /var/db= /pkg/ > from that and then do "rm -fr /var/db/pkg" and then copy my backup copy= > of /var/db/pkg to the real /var/db/pkg ? >=20 > Hummm.. that won't reflect the several things that _did_ managed to get= > updated, you know, before my system crashed. Assuming you *aren't* on a pkgng-ized system: If you have a recent backup of /var/db/pkg then you should restore from there. If you installed or updated any ports between taking the backup and the crash, then reinstalling those ports will fixup the /var/db/pkg entries for them. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. PGP: http://www.infracaninophile.co.uk/pgpkey ------enig2OOQAASWDJRKSNFOVRREN 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.16 (Darwin) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlFWpHMACgkQ8Mjk52CukIwwQACggkpX4HoB/2fzg7pOPMRUW4kv LhcAmwUz9KIOCYU+mwr9CjTS5QyB3ABH =q0dg -----END PGP SIGNATURE----- ------enig2OOQAASWDJRKSNFOVRREN--