Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Oct 2008 22:25:51 -0400 (EDT)
From:      "Josh Rickmar" <joshua_rickmar@eumx.net>
To:        "Stephen Montgomery-Smith" <stephen@math.missouri.edu>
Cc:        freebsd-ports@freebsd.org
Subject:   Re: Concern about using pkg_delete -r
Message-ID:  <61973.67.177.142.45.1224815151.squirrel@ssl.eumx.net>
In-Reply-To: <49012D63.8020201@math.missouri.edu>
References:  <53980.67.177.142.45.1224810884.squirrel@ssl.eumx.net> <49012D63.8020201@math.missouri.edu>

next in thread | previous in thread | raw e-mail | index | archive | help

On Thu, October 23, 2008 10:05 pm, Stephen Montgomery-Smith 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?
>
> I think you have the dependency relationship the wrong way around.
>
>
> If you do "pkg_delete -r pkgA", and pkgA is a dependency of pkgB (not
> the other way around as you have it), then pkgB will be deleted.
>

Ah, my bad.  Yeah, after re-reading the wording it seems that is the case.

What about for pkg_deinstall (part of portupgrade)?  According to its man
page, it has two options, --recursive (-r) and --upward-recursive (-R). 
Maybe it's just a little bit late, but what /exactly/ is the difference? 
It sounds like the --upward-recursive option would be better called
--downward-recursive, since it will remove the ports/packages "below" it.

So, if that is the case, would pkg_deinstall -R pkgA remove pkgB or not?

-- 
To send me a personal email, please place [personal] in the Subject line.




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