Subject: Re: replace-all target for
To: None <>
From: pancake <>
List: tech-pkg
Date: 01/19/2006 13:54:55
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.

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, ...)

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.

But IMHO, the use of replace target is equally dangerous than replace-all, so you can replace a library without rebuilding the depending packages and break the system. As I say in the other mail, using 'apstget relink' most minor library names changes are fixed. I've been using this feature for a long time on a lot of machines with different archs and OSs with no problems.

apstget relink also warns you about the non viable library names fixes (normally major version changes), and the maintainer will see easily what's happening or just where to take a look to fix the related problems.

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.

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.

So, IMHO most users doesn't have to use the replace target.

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.

replace-all is a hack on the replace hack :)


> > sure... but that's not built into existing pkgsrc and requires extra
> > steps rather than just typing "make replace-all".
> But pkg_chk is the only save way to update packages where the ABI or shared
> library major version changes.
> make replace would fail in such cases, thats why 'make replace' is considered
> as an hack.
> Bernd