From owner-freebsd-questions@FreeBSD.ORG Mon Aug 29 00:56:17 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B624416A41F for ; Mon, 29 Aug 2005 00:56:17 +0000 (GMT) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: from mail23.sea5.speakeasy.net (mail23.sea5.speakeasy.net [69.17.117.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id 68A9843D46 for ; Mon, 29 Aug 2005 00:56:17 +0000 (GMT) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: (qmail 28328 invoked from network); 29 Aug 2005 00:56:16 -0000 Received: from dsl092-078-145.bos1.dsl.speakeasy.net (HELO be-well.ilk.org) ([66.92.78.145]) (envelope-sender ) by mail23.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 29 Aug 2005 00:56:16 -0000 Received: by be-well.ilk.org (Postfix, from userid 1147) id D257847; Sun, 28 Aug 2005 20:56:15 -0400 (EDT) Sender: lowell@be-well.ilk.org To: freebsd-questions@freebsd.org References: <200508271417.03388.vizion@vizion.occoxmail.com> From: Lowell Gilbert Date: 28 Aug 2005 20:56:15 -0400 In-Reply-To: <200508271417.03388.vizion@vizion.occoxmail.com> Message-ID: <44zmr1muhc.fsf@be-well.ilk.org> Lines: 30 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: pkgdb usage guide 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: Mon, 29 Aug 2005 00:56:17 -0000 Vizion writes: > It would be most appreciated if someone who is familiar with the use > of pkgdb could either point to a user guide that tells one how & in > what circumstances to use the various interactive options offered by > this utility or maybe help to draft an faq on it. How about the following? The pkgdb command is a tool to create or update the system package database which is used by the portupgrade(1) tool suite. It maintains a hash that maps an installed file to a package name, a hash that maps a package to an origin, and a list of installed packages. pkg_which looks in the package database to tell which package each specified file came from. If the database is outdated but you do not have permission to update it, it delegates tasks to pkg_info(1). Actually, pkgdb and pkg_which are the same command, and are equivalent. The pkgdb command also works as an interactive tool for fixing the pack- age registry database when -F is specified. It helps you resolve stale dependencies, unlink cyclic dependencies, complete stale or missing origins and remove duplicates. You should run this command periodically so portupgrade(1) and other pkg_* tools can work effectively and reliably.