From owner-freebsd-ports@FreeBSD.ORG Tue Apr 2 09:08:50 2013 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 0AF54C8B for ; Tue, 2 Apr 2013 09:08:50 +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 E23AE17D for ; Tue, 2 Apr 2013 09:08:49 +0000 (UTC) Received: from segfault-nmh-helo.tristatelogic.com (localhost [127.0.0.1]) by segfault.tristatelogic.com (Postfix) with ESMTP id 66C7F3ACEA for ; Tue, 2 Apr 2013 02:08:44 -0700 (PDT) From: "Ronald F. Guilmette" To: freebsd-ports@freebsd.org Subject: pkg_version: the package info for package '...' is corrupt Date: Tue, 02 Apr 2013 02:08:44 -0700 Message-ID: <10955.1364893724@server1.tristatelogic.com> 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: Tue, 02 Apr 2013 09:08:50 -0000 [[ I asked about this problem on the -questions list a couple of days ago, but didn't get any relevant replies, so I'm trying again here on the -ports list. Apologies if you see this twice. ]] A couple of days ago my system just simply decided to power itself off (twice) whilst I was in the middle of doing "portupgrade -a". I have since learned that the unscheduled and unexpected power offs were due to a CPU cooling problem. I believe that I have that problem in hand now. Separately however, and probably as result of the sudden power offs, when I run pkg_version now I am getting many messages relating to various of my installed packages, all having 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! And by the way, I just happen to have made a full system backup quite recently. Do I just simply need to get the entire contents of /var/db/pkg/ from that backup, and then do "rm -fr /var/db/pkg" and then copy my backup copy of /var/db/pkg to the real /var/db/pkg ? Will that fix the problem?