Subject: Re: Updating packages
To: Trey Sizemore <trey@thesizemores.net>
From: =?UTF-8?Q?C=C3=A9sar_Catri=C3=A1n_Carre=C3=B1o?= <ccatrian@eml.cc>
List: pkgsrc-users
Date: 12/15/2006 19:54:23
--Signature=_Fri__15_Dec_2006_19_54_23_-0300_Pj27Cb9=G=JGxDEA
Content-Type: text/plain; charset=UTF-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit

On Wed, 13 Dec 2006 13:12:39 -0500
Trey Sizemore <trey@thesizemores.net> 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

--Signature=_Fri__15_Dec_2006_19_54_23_-0300_Pj27Cb9=G=JGxDEA
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (NetBSD)

iD8DBQFFgyeh0CA0DpFTlnERAjyKAJ9T4QRZJycyGp1gRqUqF49dgelanACgk/9z
hFaWGhID57CfXYQvfo63WEA=
=tSF0
-----END PGP SIGNATURE-----

--Signature=_Fri__15_Dec_2006_19_54_23_-0300_Pj27Cb9=G=JGxDEA--