From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 4 13:04:42 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3B4FE37B404 for ; Fri, 4 Apr 2003 13:04:42 -0800 (PST) Received: from sccrmhc03.attbi.com (sccrmhc03.attbi.com [204.127.202.63]) by mx1.FreeBSD.org (Postfix) with ESMTP id 544B043F93 for ; Fri, 4 Apr 2003 13:04:41 -0800 (PST) (envelope-from sandshrimp@attbi.com) Received: from attbi.com (12-228-93-40.client.attbi.com[12.228.93.40]) by sccrmhc03.attbi.com (sccrmhc03) with SMTP id <2003040421044000300p612oe>; Fri, 4 Apr 2003 21:04:40 +0000 Message-ID: <3E8D835A.6030603@attbi.com> Date: Fri, 04 Apr 2003 13:06:34 +0000 From: Ryan Merrick User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.1) Gecko/20021026 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Danny Braniss References: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: hackers@freebsd.org Subject: Re: ports and /var/db/pkg X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Apr 2003 21:04:42 -0000 Danny Braniss wrote: >>>>>ok, so i wrote a small script (tcl, since i don't know perl), that >>>>>does some checking, it reports for each package, the number of files >>>>>how many are realy there, and if so, checks the MD5. >>>>> >>>>>now, if im not to far off, if some/all files are missing, or if the >>>>>md5 does not match, i should be able to remove the package info, ... >>>>> >>>>> >>>>Well, that's not what you were asking for originally, and tools >>>>already exist to check that. >>>> >>>> >>>OK, let me refrase it >>> >>>PROBLEM: >>>how to update /var/db/pkg, when it knows too much, >>>i.e. /usr/local has less stuff that /var/db/pkg knows about. >>> >>> >>> >>>>e.g. pkg_info -g and the example from the pkg_which(1) manpage that I >>>>mentioned to you in a previous email. >>>> >>>> >>>i read most of the pkg*, and though im very impressed, i fail to find a >>>clear/easy way to get a one line output saying: >>>pkg xyz no longer exits, can be removed from database >>>thanks, >>>danny >>> >>> >>If you know that package XYZ exists in /var/db/pkg but isn't in /usr/local >>(probably because you didn't 'make deinstall' or pkg_delete it), just do >>this: >> >>rm -rf /var/db/pkg/XYZ >> >> >> > >sorry, no points. it's a correct answer but that was/is not the question :-) > how do you know that XYZ is no longer there? >sure, pkg_info -g will tell you which files are no longer there, or have bad >md5, but is one file? or all files? > >danny > > > >>-- >>Matt Emmerton >> >> >> > > >_______________________________________________ >freebsd-hackers@freebsd.org mailing list >http://lists.freebsd.org/mailman/listinfo/freebsd-hackers >To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > > > Hello, Take a look at pkgdb -F " 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 ori- gins and remove duplicates. You have to run this periodically so portupgrade(1) and other pkg_* tools can work effectively and unfail- ingly. " From #man pkgdb (1) -Ryan