From owner-freebsd-questions@FreeBSD.ORG Sat Mar 30 08:17:40 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 9F0D1FA2 for ; Sat, 30 Mar 2013 08:17:40 +0000 (UTC) (envelope-from rfg@tristatelogic.com) Received: from outgoing.tristatelogic.com (segfault.tristatelogic.com [69.62.255.118]) by mx1.freebsd.org (Postfix) with ESMTP id 82820717 for ; Sat, 30 Mar 2013 08:17:40 +0000 (UTC) Received: from segfault-nmh-helo.tristatelogic.com (localhost [127.0.0.1]) by segfault.tristatelogic.com (Postfix) with ESMTP id 5503F3AD8F for ; Sat, 30 Mar 2013 01:17:29 -0700 (PDT) From: "Ronald F. Guilmette" To: freebsd-questions@freebsd.org Subject: Ah crap! pkg_version: the package info for package '...' is corrupt Date: Sat, 30 Mar 2013 01:17:29 -0700 Message-ID: <10944.1364631449@server1.tristatelogic.com> 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:17:40 -0000 Today my system crashed twice while I was doing "portupgrade -a". 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 thing crashed, the machine just simply shut itself off. This exact same thing has also happened a couple of other times in the past week.) I'll deal with the power issue soon, but right now I am more worried about 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: pkg_version: the package info for package 'PKG' is corrupt where `PKG' is the name of some package or another that I have installed. I have at least 6 such messages for different packages I have installed... and probably more. I googled around a bit and did not find any good explanation for the above error or, more importantly, what to do about it. I gather however that my package data base has become corrupted. OK, so how does one rebuild that from scratch? Please don't tell me that I have to reinstall every bleedin' port from scratch! Regards, rfg P.S. Oh! I just remembered. I made a full system backup quite recently... 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 ? Hummm.. that won't reflect the several things that _did_ managed to get updated, you know, before my system crashed.