Subject: Re: replace-all target for
To: None <>
From: None <>
List: tech-pkg
Date: 01/19/2006 14:59:21
Please fix your MUA to wrap lines at 72 characters.

On Thu, Jan 19, 2006 at 01:54:55PM +0100, pancake wrote:
> The "good" way is using pkg_comp and pkg_chk, but this is only available
> for NetBSD systems. I've been maintaining some boxes (Open,Free and
> GNU/Linux) for years with pkgsrc using the replace with no critical problems.

There's no inherent technical reason for pkg_comp being NetBSD specific.
As I tried to explain in private mail, it is actually quite easy to add
support for all BSDs and a bit more work for Linux (no simple
installworld or tarball extraction).

> IMHO, the package maintainer must know this kind of problems (related to
> library changes), end users will probably use binary packages, or whatever
> any other of the multiples ways to build a package with pkgsrc.
> (bmake install, update, ...)

That's why revisions are bumbed, when sonames change. But it doesn't
cover all cases, because some changes were not intended to break e.g. an
ABI etc.

> So, I think that "replace-all" feature must be inserted into the pkgsrc
> framework to allow experienced users to do this kind of things, but of
> course showing a warning message about the problems related to this.

replace-all is inherently *much* more dangerous than replace. The effect
of the latter is bound to a single package and can normally evaluated
easily, the former has a global meaning and is therefore a lot more
likely to break something. Especially with the average desktop software
mess of 300+ packages, the likeliness of some incompatible changes in
any of them is very high.

> I'm conscient about the users impact of this kind of features, that can
> increase the number of PRs reported about "broken packages"... But users
> MUST know about the problems related about using the "replace" target.

Users tend to ignore such messages. Just look at some Gentoo "expert"
suggesting to compile all software with -O3 -march=pentium3 -ffast-math,
of which at least one option is known to break algorithms.

> Another "bug" related to the "replace" target is that replacing a package
> depends on pkg_tarup, and this is not installed/checked by default,
> so pkgsrc shows an error missatge saying that no pkg_tarup is installed.

pkg_tarup is incompletely and normally not needed. Why should it be
installed by default?

> But, I think that it's an interesting feature for advanced users. So it
> allows to install software with the minimum downtime (make update deletes
> the package before building the new), etc.

If you worry about downtime, build in a chroot. Whether pkg_comp exists
for your platform or not, doesn't matter. You can't be serious about
downtime and suggest replace at the same time, which can randomly kill
your system during an update in such a way that it is found only much

> > > sure... but that's not built into existing pkgsrc and requires extra
> > > steps rather than just typing "make replace-all".

And pkg_chk is a simple *shell script*. It requires almost zero space
and allows easy updating of a set of packages, e.g. you specify what you
want and you get that up to date.