From owner-freebsd-ports@FreeBSD.ORG Thu Jun 14 23:22:46 2007 Return-Path: X-Original-To: freebsd-ports@FreeBSD.org Delivered-To: freebsd-ports@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BEEB816A468 for ; Thu, 14 Jun 2007 23:22:46 +0000 (UTC) (envelope-from nlecic@EUnet.yu) Received: from smtpclu-6.eunet.yu (smtpclu-6.eunet.yu [194.247.192.231]) by mx1.freebsd.org (Postfix) with ESMTP id 4F53313C4BC for ; Thu, 14 Jun 2007 23:22:45 +0000 (UTC) (envelope-from nlecic@EUnet.yu) Received: from nyx.localhost (adsl-220-201.eunet.yu [213.198.220.201]) by smtpclu-6.eunet.yu (8.13.6/8.13.6) with ESMTP id l5ENMbZt009741; Thu, 14 Jun 2007 23:22:40 GMT Message-Id: <200706142322.l5ENMbZt009741@smtpclu-6.eunet.yu> Date: Fri, 15 Jun 2007 01:22:38 +0200 From: Nikola Lecic To: Jeremie Le Hen In-Reply-To: <20070614075418.GA8093@obiwan.tataz.chchile.org> References: <20070614070602.GD39533@obiwan.tataz.chchile.org> <200706140714.l5E7EK0U023767@smtpclu-1.eunet.yu> <20070614075418.GA8093@obiwan.tataz.chchile.org> X-Mailer: Claws Mail 2.9.2 (GTK+ 2.10.12; i386-portbld-freebsd6.2) X-Operating-System: FreeBSD 6.2-RELEASE X-Face: pbl6-.[$G'Fi(Ogs2xlXP-V6{3||$Y[LOYs&~GJoikj'cVjcFC[V7du;;0~6nO= [Vi2?uU1Pq~,=Adj@,T:|"`$AF~il]J.Nz#2pU',Y7.{B;m/?{#sO^Dvo$rnmY6] Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-EUNET-AVAS-Milter-Version: 2.0.0 X-AVAS-Virus-Status: clean X-AVAS-Spamd-Symbols: BAYES_60,TW_KG,TW_XF,UNPARSEABLE_RELAY X-AVAS-Spam-Score: 1.2 X-AVAS-Spam-Level: xx Cc: Robert, Huff , Jeremie Le Hen , freebsd-ports@FreeBSD.org Subject: Re: Keeping track of automatically installed dependency-only ports 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: Thu, 14 Jun 2007 23:22:46 -0000 On Thu, 14 Jun 2007 09:54:18 +0200 Jeremie Le Hen wrote: > My request ismore subtle, I think. >=20 > Consider the following fake port tree: >=20 > port1 port2 port3* port4 > \ / \ | / > \ / \ | / > port12* \ | / > \ | / > port234* >=20 > A trailing * marks a port manually installed. >=20 > If I run "pkg_deinstall --upward-recursive port234", this will remove > port234, port3 and port4 (at least I suppose, the manual page doesn't > give the details). But since I've installed port3 manually it's > likely because I need it for some reason, therefore I don't want it > to be deinstalled. Yes, now I see what you want. For example, you want xmms, portupgrade installs xmms+x1,x2... Then you install mplayer+y1,y2... with an option that links xmms as its dependency; then you want 'pkg_deinstall mplayer' to leave xmms intact. At the first place, I think such a situation occurs extremly rare.=20 However, assuming you have a list of 'never-deinstall' ports in a file called EXCEPTIONS (such as 'xmms xfce4 firefox ...'), then pkg_deinstall -R -x `cat EXCEPTIONS` pkgname_glob will do exactly what you want (and surely will do no harm). I recommend you to study pkg_glob(1) to get an idea what you can add behind '-x'. I think there is no tweaking of /usr/local/etc/pkgtools.conf that can maintain your EXCEPTIONS list, since portupgrade doesn't make any difference between ports it installs (as Robert has already told you). If that's not true, let someone corrects me. Maybe you can try to write a tiny wrapper script that will add a pkgname_glob (passed as an argument to portinstall) to the EXCEPTIONS list, since that glob surely belongs to it. Of course, this is all very crude, but maybe can help a bit. Nikola Le=C4=8Di=C4=87