From owner-freebsd-stable@FreeBSD.ORG Thu Jul 23 01:41:53 2009 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C0AA51065678 for ; Thu, 23 Jul 2009 01:41:53 +0000 (UTC) (envelope-from ben@morrow.me.uk) Received: from relay.pcl-ipout02.plus.net (relay.pcl-ipout02.plus.net [212.159.7.100]) by mx1.freebsd.org (Postfix) with ESMTP id 5958B8FC26 for ; Thu, 23 Jul 2009 01:41:53 +0000 (UTC) (envelope-from ben@morrow.me.uk) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: As4EAPtVZ0rUOFPl/2dsb2JhbACBUdBzhA4F Received: from plesk-mail01.plus.net ([212.56.83.229]) by relay.pcl-ipout02.plus.net with ESMTP; 23 Jul 2009 02:12:47 +0100 Received: (qmail 11607 invoked from network); 23 Jul 2009 01:12:47 +0000 Received: from host81-155-194-55.range81-155.btcentralplus.com (HELO osiris.mauzo.dyndns.org) (81.155.194.55) by plesk-mail01.plus.net with SMTP; 23 Jul 2009 01:12:47 +0000 Received: (qmail 29491 invoked by uid 1001); 23 Jul 2009 01:12:46 -0000 Date: Thu, 23 Jul 2009 02:12:46 +0100 From: Ben Morrow To: freebsd-stable@freebsd.org Message-ID: <20090723011246.GA29465@osiris.mauzo.dyndns.org> Mail-Followup-To: freebsd-stable@freebsd.org References: <1248027417.14210.110.camel@neo.cse.buffalo.edu> <58F0204B-ECE6-479A-AAC2-7868E71ABB43@exscape.org> <367b2c980907200729s57eafbbfw83c8ae5a94f41ffc@mail.gmail.com> <4A6628F0.6080802@mail.zedat.fu-berlin.de> <20090721215201.GA61999@troutmask.apl.washington.edu> <1248277420.8644.70.camel@localhost> <20090722193033.GA83848@zim.MIT.EDU> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090723002651.GA11945@duncan.reilly.home> X-Newsgroups: gmane.os.freebsd.stable Organization: Who, me? User-Agent: Mutt/1.5.17 (2007-11-01) Subject: Re: HEADS-UP: Shared Library Versions bumped... X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Jul 2009 01:41:54 -0000 Quoth Andrew Reilly : > On Wed, Jul 22, 2009 at 03:30:33PM -0400, David Schultz wrote: > > I do the same thing. I wish the ports system kept track of which > > ports were installed explicitly by me, and which were only > > dependencies. Then it would be possible to garbage collect ports > > that are no longer needed. > > Portmaster -s will cull ports that are "no longer depended on". > Seems to work fairly well. > > You can (probably) find the list of ports that you installed > deliberately by trawling through /var/db/pkg for those that > don't have a +REQUIRED_BY file. (The portmaster -s trick works > by finding ports that have a +REQUIRED_BY file that is empty, I > believe.) The problem with that is if you install pkg A deliberately, but it then later becomes a dependancy of pkg B. If you remove pkg B (because it's no longer needed) there is then no evidence that pkg A was installed on purpose, rather than incidentally. portmaster -s will offer to remove it, and if you refuse it will offer to remove the empty +REQUIRED_BY, effectively promoting it to a 'manually installed' pkg again, though it's perhaps not entirely clear from the question that that is what the effect will be. This would be easy to solve in general by maintaining a 'world' package, or some such, that had dependencies on everything installed explicitly; but that would require modifying all the pkg and port installation tools (probably including bsd.port.mk itself) to support that convention. Ben