On Wed, 13 Dec 2006 13:12:39 -0500 Trey Sizemore <trey%thesizemores.net@localhost> wrote: > > Looking for resources/best practices with updating packages on my > NetBSD 3.1 box. > First of all, I have a meta-package with all the packages I need, and I use pkg_comp to mantain a set of binaries, built from source. pkg_comp is set to install binary packages in local repository before looking at external sources. I use HEAD branch and -current, but YMMV. This is what I do: · Clean work directories with pkgclean (prevent reflexes directories in pkg_comp) · Un-apply local patches (whatever someone is using) · Move wip to some other place and update both $ cvs -z1 -q update -dP pkgsrc $ cvs -z1 -q update -dP wip · Check for merged files (for precaution, "/C " & "/M " to the output of cvs) · Eliminate out of date distfiles and packages # lintpkgsrc -pro · Identify packages that need upgrade $ lintpkgsrc -i > Tmp/lintpkgsrc.orig · ... eliminate garbage by vi... $ cd Tmp ; cp lintpkgsrc.orig lintpkgsrc ; vi lintpkgsrc · Generate other meta-package with the old packages $ pkgdepgraph -s lintpkgsrc > list $ for package in `cat list`; do for> echo "DEPENDS+=\t\t`echo $package | sed -e "s/-[^-]*$//"`-[0-9]*:../../\ for> `pkg_info -B $package | grep PKGPATH | cut -f 2 -d "="`" >> update for> for> done Then you have a piece of meta-package to add to a complete one, with all the outdated depends. · Check local patches · Build the chroot · cd wip/update_stuff && make · Optional: If you don't have all the rest of binary packages, you will have to build them. When finished, you will have all the binary packages. · Then remove the old packages, going to single user mode if you like. # for package in `cat list`; do for> pkg_delete -r $package for> done · Then you run, in your meta-package directory with all the programs you need, $ make And it will install all the outdated binary packages with their dependences. · If you didn't do the single user stuff, it is a good idea do it now. The only problem is when a package doesn't build; this happens not very frecuently on HEAD, but you can use a stable branch if you like. It seems long, but I feel too lazy. Refer to the last acronym =) Regards -- César Catrián Carreño
Attachment:
pgpMp6IaFCgJo.pgp
Description: PGP signature