[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Update all the packages that depend on a particular package



On Thu, Jul 06, 2006 at 01:18:45PM -0400, Kamaraju Kusumanchi wrote:
> Nope. apt-get upgrade or dist-upgrade wants to upgrade a slew of other 
> packages besides what I want. I dont want to upgrade the entire system. I 
> just want to upgrade privoxy and its dependencies.

1) Install apt-rdepends.
2) Do apt-rdepends privoxy to recursively list privoxy's
   dependencies, and its dependencies' dependencies, and
   so forth.
3) Use this shell command to munge that list into a list of
   unique package names:
   apt-rdepends privoxy |grep Depends |sed 's/^\s\+Depends: //' |sed 's/([^)]\+)$//' |sort |uniq

I presume that apt-rdepends also outputs some optional
dependencies, or multiple packages that satisfy the same
dependency (like www-browser). You'll need to do a bit more
work to take the list from item 3) and compare it to the
list of the packages you've already got installed. If
Privoxy is already installed, all its dependencies will also
be installed as well, so you can go ahead and only upgrade
the packages that you've got installed.

This is all doable inside a short Perl script, but the
margin is too small to contain it.

-- 
Stephen R. Laniel
steve@laniels.org
Cell: +(617) 308-5571
http://laniels.org/
PGP key: http://laniels.org/slaniel.key

Attachment: signature.asc
Description: Digital signature


Reply to: