Subject: Re: replace-all target for bsd.pkg.mk
To: None <tech-pkg@NetBSD.org>
From: Antoine Reilles <Antoine.Reilles@loria.fr>
List: tech-pkg
Date: 01/19/2006 16:10:03
--CE+1k2dSO48ffgeK
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Jan 19, 2006 at 08:17:09AM +0100, Bernd Ernesti wrote:
> On Wed, Jan 18, 2006 at 10:24:21PM -0800, Aaron J. Grier wrote:
> > On Tue, Jan 17, 2006 at 03:28:46PM +0100, joerg@britannica.bec.de wrote:
> > > On Tue, Jan 17, 2006 at 03:19:34PM +0100, pancake wrote:
> > > > I have been using pkgsrc for years and I always found hard to
> > > > upgrade large dependency programs with pkgsrc. BTW the most silly
> > > > tip is imho the impossibility to automatize the replace of
> > > > dependencies of the main package.
> > >=20
> > > Have you looked at pkgtools/pkg_chk?
> >=20
> > sure... but that's not built into existing pkgsrc and requires extra
> > steps rather than just typing "make replace-all".
>=20
> But pkg_chk is the only save way to update packages where the ABI or shar=
ed
> library major version changes.
> make replace would fail in such cases, thats why 'make replace' is consid=
ered
> as an hack.

I also use pkgdepgraph to get this job done on my darwin machine (where
i do not use pkg_comp), using the following steps:

lintpkgsrc -i > out_of_date
pkgdepgraph -d /usr/pkg/pkgdb -D out_of_date > delete
MAKE=3Dbmake pkgdepgraph -d /usr/pkg/pkgdb -R out_of_date > rebuild
sudo pkg_delete `cat delete`
sudo sh rebuild

The advantage i see there over pkg_chk is that at each step i can edit
the scripts before really removing and building stuff. For instance, i
usually move stuff in the "rebuild" script, to make sure the
"important" tools (mutt, irssi, vim) are rebuild before, e.g. building
firefox, so that do not have to wait too long before using it.


Of course, this solution comes from mailing list archives too.
We could add a detailed list of all solutions for upgrading packages in
the pkgsrc guide, listing pro/cons, and how to best setup those
solutions.

antoine

--CE+1k2dSO48ffgeK
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (Darwin)

iD8DBQFDz6vL4VqmoGDE/mwRAqkFAJ9yGhDMAx4kN2S7qE2CJyeOV69O1wCfS7Xm
cHlHuCO2M9F0K6P4kHZLfGk=
=cbkT
-----END PGP SIGNATURE-----

--CE+1k2dSO48ffgeK--