Subject: Re: using pkg_comp to rebuild out-of-date packages?
To: Steven M. Bellovin <>
From: =?UTF-8?Q?C=C3=A9sar_Catri=C3=A1n?= C. <>
List: tech-pkg
Date: 08/16/2005 09:19:11
On Mon, 15 Aug 2005 14:29:09 -0400
"Steven M. Bellovin" <> wrote:

> Is there a good way to use pkg_comp to rebuild just the out-of-date
> packages?
> I know how to use pkg_comp to rebuild everything: use pkg_chk -g
> to produce a list, and put that into the pkg_comp file.  I can also 
> delete/rebuild just the out-of-date stuff by using lintpkgsrc -i
> and pkgdepgraph -D/-R.  I'd like to do the latter in a chroot'd 
> partition without having to recompile -- or even pkg_tarup plus install 
> under chroot -- all of the dependencies that aren't out of date.  Is 
> there any good way to do that?  (If I had to, I'd settle for something 
> that automatically built tarballs of the dependencies, for automatic 
> preinstallation in the pkg_comp area, but I don't even know a good way 
> to do that.)
> 		--Steven M. Bellovin,

Now I am updating in this way:

· Update pkgsrc and delete old packages and stuff.
· Make a list of the packages that need updating 
  `lintpkgsrc -i > list'
· Generate meta-package with the list of packages made by lintpkgsrc
· Add variables BINPKG_SITES="" and DEPENDS_TARGET="bin-install distclean"
  to pkg_comp (and the real mk.conf too)
· Build binary packages using the meta-package
· Generate list of packages that need to be deinstalled 
  `pkgdepgraph -D list >> deinstall'
· Delete the old packages and dependencies. I use make deinstall for all, but
  the script generated by pkgdepgraph is fine.
· Reinstall everything using another meta-package with all the programs I use.

The only missing thing is to generate the first meta-package in dependencies
order, because it fails the binary installation if a package is missing.


César Catrián C.