Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Jun 2007 01:22:38 +0200
From:      Nikola Lecic <nlecic@EUnet.yu>
To:        Jeremie Le Hen <jeremie@le-hen.org>
Cc:        Robert, Huff <roberthuff@rcn.com>, Jeremie Le Hen <jeremie@le-hen.org>, freebsd-ports@FreeBSD.org
Subject:   Re: Keeping track of automatically installed dependency-only ports
Message-ID:  <200706142322.l5ENMbZt009741@smtpclu-6.eunet.yu>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 14 Jun 2007 09:54:18 +0200
Jeremie Le Hen <jeremie@le-hen.org> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200706142322.l5ENMbZt009741>