Subject: Re: "make update" question
To: Huub <huubvanniekerk@gmail.com>
From: Greg Troxel <gdt@ir.bbn.com>
List: netbsd-help
Date: 09/18/2006 08:51:38
--=-=-=


  I want to update some packages (e.g. firefox) but all I know from the
  user guide is do "make update". This way everything gets updated. Is
  there a way to just upgrade 1 package and all dependancies? E.g. on
  FreeBSD: "portupgrade -R firefox"? I know other utilities exist, but
  those are branded as "not guaranteed to work".

"make replace" actually works quite well, despite the stern warnings.
There are two kinds of possible problems:

  bugs in make replace, where random bad things happen.  This basially
  doesn't ever happen to me.

  problems from ABI changes, where make replace works as intended, but
  then depending packages breaks.


One solution to the second problem is to track packages that have had
a dependency replaced, and then to rebuild them.  pkgsrc marks such
packages with the unsafe_depends variable.

A tool "pkg_rolling-replace" is available that does a topological sort
of all packages and then does "make replace" in tsort order.  It can
replace "dirty" packages (those marked unsafe_depends), or the union
of dirty packages and packages that are out of date relative to
pkgsrc.  (It also replaces packages with the 'rebuild' tag.)

I'm not quite sure what -R does; perhaps you also want to update any
packages  that firefox depends on.

pkg_rolling-replace will be in pkgsrc at some point, but for now it's
available at:

http://acert.ir.bbn.com/projects/acert/
http://acert.ir.bbn.com/viewvc/acert/pkgsrc-acert/

To check it out:

cd /usr/pkgsrc && \
cvs -d anoncvs@acert.ir.bbn.com:/cvs/acert co -d acert pkgsrc-acert
cd acert/pkg_rolling-replace && make package

Read the man page for pkg_rolling-replace for details and please email
me with any bugs in the script or the man page.

You may want to run this script if your dependency records are not
correct.

/usr/pkgsrc/acert/pkgdb_fix-required-by/files > ls -l
total 5
drwxr-xr-x  2 gdt  wheel   512 Sep 18 08:39 CVS
-r-xr-xr-x  1 gdt  wheel  3355 Jul 16 09:56 pkgdb_fix-required-by.sh

--=-=-=
Content-Type: application/pgp-signature

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

iD8DBQFFDpZa+vesoDJhHiURAlOZAJ4ztj2fJjMRWQkCbI6rAtDqzAwPGwCgj4DN
Gr7fg/+yTJwaYyqI1dlqnNU=
=61Ym
-----END PGP SIGNATURE-----
--=-=-=--