Subject: Re: pkgsrc dependency problem
To: Steven M. Bellovin <>
From: Andrew Brown <>
List: netbsd-users
Date: 12/18/2003 17:41:29
>There are some tools I use to ease such updates.  'pkgdepgraph -D -O foo'
>will tell you what you have to delete to delete foo.  Using -R instead 
>of -D will generate a rebuild script.  (Make sure you run that *before* 
>you actually do the deletions.  Ask me how I learned this...)  'pkg_chk -u'

just to check...if i understand you, by "run this" you mean the
"pkgdepgraph -R" command, not the actual rebuild script, right?

executing the output of pkgdepgraph -Faa is also a good idea, but it
won't necessarily cause the downloading of distfiles that are new
dependencies of already installed pkgs.

>will bring everything up to date with your current pkgsrc; I recommend 
>using the -k flag, since the odds that something won't rebuild 
>successfully are non-trivial, and you want a log of what needs to be 
>rebuilt.  One friend says the he rebuilds his pkg stuff from scratch, 
>once a month or so, but that's a semi-manual process; there don't seem 
>to be any good tools that are completely dependable to help with that.

pkgdepgraph -Da will list all pkgs in inverse dependency order (ie, an
order such that any given pkg only comes after any that depend on it),
and pkgdepgraph -Raa will generate a script that will rebuild all

modulo those pkgs that have moved within the pkgsrc hierarchy.

|-----< "CODE WARRIOR" >-----|             * "ah!  i see you have the internet (Andrew Brown)                that goes *ping*!"       * "information is power -- share the wealth."