From owner-freebsd-ports@FreeBSD.ORG Sat Jan 10 15:22:23 2009 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8B9201065674; Sat, 10 Jan 2009 15:22:23 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.173]) by mx1.freebsd.org (Postfix) with ESMTP id E2CE18FC18; Sat, 10 Jan 2009 15:22:22 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: by ug-out-1314.google.com with SMTP id 30so88943ugs.39 for ; Sat, 10 Jan 2009 07:22:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=1Ftpswki0ghGXSP/D7r/6GmuUTxKiVIH1v6wMfWmhy4=; b=f/wmgk4rpeWfxD3RLhlmhNKSWHqo2aQN5CNAWm87llAam8xPZS3A0RBsdKKU67ViWs ZdzTUe85WAjVIFnJgmVnmxdaZUcgu8ZEliTfETlLutg9P6MqEyiJWO5l7gv0LSgJRtjx W/aDqvdepwLcwlZkFWcGId2OwshdRqaa6A7DA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=wlz+ytvllKqToCdoYAtBo4KOow7V/WhRSfevEPkGPpbUJuipLWwV47rlIEFteZf5lf N0ZFQp4mAFwI29ceWerTMZ5MfEyHwVwEuoN4LojP0U2JIKFIlxXvlFeKvEZ76xXsUNB2 owGFZboKc8dIlj92zcfS96Kn6595vK52YWEG4= Received: by 10.67.97.3 with SMTP id z3mr255465ugl.37.1231600941768; Sat, 10 Jan 2009 07:22:21 -0800 (PST) Received: by 10.67.88.9 with HTTP; Sat, 10 Jan 2009 07:22:21 -0800 (PST) Message-ID: <7d6fde3d0901100722g67c5200ex5552b2e19d1ae7d4@mail.gmail.com> Date: Sat, 10 Jan 2009 07:22:21 -0800 From: "Garrett Cooper" To: "Doug Barton" In-Reply-To: <49681E6C.9060703@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <53980.67.177.142.45.1224810884.squirrel@ssl.eumx.net> <49681E6C.9060703@FreeBSD.org> Cc: Josh Rickmar , freebsd-ports@freebsd.org Subject: Re: Removing stale dependencies (Was: Re: Concern about using pkg_delete -r) X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 15:22:24 -0000 On Fri, Jan 9, 2009 at 8:05 PM, Doug Barton wrote: > Josh Rickmar wrote: >> I'm hoping that this list covers port tools as well as the usual >> discussions about the actual ports. If not, please CC this to the proper >> list. >> >> I want to use pkg_delete to remove an installed port, but also want to >> remove its orphaned dependencies along with it. After looking at the >> pkg_delete(1) man page, the -r flag seems to be the option to use for this >> job. My concern, though, is about the wording: >> >>> In addition to specified packages, delete all >>> packages that depend on those packages as well. >> >> Does this mean that if I pkg_delete -r pkgA, than pkgB (a dependency) will >> be removed with it, even though it is dependency of pkgC? Or is >> pkg_delete (or pkg_deinstall) smart enough to understand this dependency >> and keep pkgB installed? >> >> If in this scenario pkgB would be deleted, should an extra warning be >> added to the man page so that users know that using this flag could >> potentially break their other ports? > > ports-mgmt/portmaster has options to do what you want. The -s option > will detect any port that was installed as a dependency of another > port (or ports) but is no longer needed; and will give you an option > to delete it. (It's an option because things can sometimes move from > being a leaf port to being a dependency.) > > The -e option allows you to "expunge" a leaf port that you no longer > want and then runs portmaster again with -s to detect any newly > orphaned dependencies. > > Both options are compatible with the -[dD] options to delete or not > delete the relevant distfiles and the -b option to create backup > packages of the installed bits before deleting them. > > I suggest running -s first, then 'portmaster -l' to get a list of what > you have installed. Anything listed as a "root" or "leaf" port can be > fed to the -e option. > > > hth, > > Doug I just started using portmaster this past week, and it appears to go a bit crazy removing dependencies -- there were a lot of libraries broken after removing dependencies that shouldn't have been. This could all be because of bad dependencies in the Makefiles though. For instance, I kept azureus, but zapped libcroco and libgnome (I thought they had gotten included in the wine-doors install I deleted on my system), and it broke my upgrade from azureus to vuze (the libraries for both are essentially the same, but vuze uses swt-devel whereas azureus uses swt I think..). My 2 cents, -Garrett