From owner-freebsd-questions@FreeBSD.ORG Sat Aug 8 20:13:32 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C8713106566B for ; Sat, 8 Aug 2009 20:13:32 +0000 (UTC) (envelope-from bf1783@googlemail.com) Received: from mail-ew0-f212.google.com (mail-ew0-f212.google.com [209.85.219.212]) by mx1.freebsd.org (Postfix) with ESMTP id 5905F8FC1D for ; Sat, 8 Aug 2009 20:13:31 +0000 (UTC) Received: by ewy8 with SMTP id 8so1727067ewy.36 for ; Sat, 08 Aug 2009 13:13:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=G05V9M/JTQazJBB/fqgk4TucpV7AgWM4mZqVLXqchQk=; b=szngwSpyHXkdQjuRHTiiO06+A+Iogon47SGQ+Wz67L48lrTBB1xC7jgjjJ+IOv/Yw/ 2s9PXTBoWn+o3Rknzb9QGgAPwdi4wuhZcCpwUTa7NDYJQ+sNzt9Hext5P8iyzMr9b0A6 O8GZxzZj/UZAexj5iqez+GENcxhp+KVoggmAE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=uLLo/akQJ09w6hmsnucQluZ3yJYphGq/Q8ii5PhqaRzLt5AYkapLR5RCbb2iPEELAe hldjFGi8UnwKyvbF4/996VnVSyMhNNi3yt6Hn3MyZP7xLHZLpHU/XgLKqPB/cS/0a56f 8fGXpEw5zLUlnUCdCspgfQD+YPuaR4mbTmejY= MIME-Version: 1.0 Received: by 10.216.17.212 with SMTP id j62mr537509wej.132.1249762411192; Sat, 08 Aug 2009 13:13:31 -0700 (PDT) In-Reply-To: References: <200908080932.27489.mel.flynn+fbsd.questions@mailing.thruhere.net> Date: Sat, 8 Aug 2009 20:13:31 +0000 Message-ID: From: "b. f." To: Robert Huff Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: Recovering loss of /var/db/pkg ? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Aug 2009 20:13:33 -0000 Robert Huff wrote: > Unfortunately, I know of no way of rebuilding the contents of >/var/db/pkg without re-(compiling, installing) every component of every >port. If it does not exist, this would be a _killer_ ability to have; >it's not often required (one hopes!) but when it is it would be a total >lifesaver. Well, if you know which ports were installed, and if the installed ports correspond to the versions in your ports tree, and if both make.conf and /var/db/ports are intact (a lot of ifs here ...), you can reconstruct it by running : make generate-plist fake-pkg in the origin of each of the installed ports, which doesn't require rebuilds. IF there is cruft left in /var/db/pkg, then you need to do this with FORCE_PKG_REGISTER=yes, or empty /var/db/pkg first. b.