From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 4 03:40:30 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 7D20937B401 for ; Fri, 4 Apr 2003 03:40:30 -0800 (PST) Received: from tomts12-srv.bellnexxia.net (tomts12.bellnexxia.net [209.226.175.56]) by mx1.FreeBSD.org (Postfix) with ESMTP id 52B3A43F3F for ; Fri, 4 Apr 2003 03:40:29 -0800 (PST) (envelope-from matt@gsicomp.on.ca) Received: from gabby.gsicomp.on.ca ([65.95.176.5]) by tomts12-srv.bellnexxia.netESMTP <20030404114028.UKRM20288.tomts12-srv.bellnexxia.net@gabby.gsicomp.on.ca>; Fri, 4 Apr 2003 06:40:28 -0500 Received: from hermes (hermes.gsicomp.on.ca [192.168.0.18]) by gabby.gsicomp.on.ca (8.12.6/8.12.6) with SMTP id h34BbQiG050084; Fri, 4 Apr 2003 06:37:26 -0500 (EST) (envelope-from matt@gsicomp.on.ca) Message-ID: <025401c2fa9e$c60fdba0$1200a8c0@gsicomp.on.ca> From: "Matthew Emmerton" To: "Kris Kennaway" , "Danny Braniss" References: Date: Fri, 4 Apr 2003 06:38:54 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 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 11:40:30 -0000 > > > > 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 -- Matt Emmerton