Subject: Re: (Incomplete) List of pkgsrc Improvements
To: Greg Troxel <>
From: Dieter Baron <>
List: tech-pkg
Date: 08/01/2007 17:41:44
On Wed, Aug 01, 2007 at 09:55:57AM -0400, Greg Troxel wrote:
> Dieter Baron <> writes:
> >>  I see the depending package as simply recording what it was
> >> built against, and the rule is that the version of libfoo has to be >=
> >> the recorded version, and the EARLIEST_COMPATIBLE_ABI for libfoo has to
> >> be <= the recorded version.
> >
> >   Yes.  Although I don't know if I really want to go from recording
> > dependency patterns to just recording the version it was built
> > against, as that looses flexibility.  We would have to check wether
> > that flexibility is used/needed somewhere in pkgsrc.
> I think what we've learned from this exercise is that the notion of
> dependency patterns for a binary package is broken.  A particular
> version was linked against, and so that version can be used, or any
> later version that doesn't break ABI compatibility (more or less by
> definition).  Can you give an example of where a pattern would make
> sense and the 'record version it was built against' would fail?

  Not offhand, but pkgsrc is a big and complicated beast.  I'll
investigate furhter.

> >> If you want pkg_add -u to need some sort of forcing flag in the case of
> >> a known ABI change, that's fine with me.  The binary version of
> >> pkg_rolling-replace will just always use the flag.
> >
> >   I' okay with it if it requres a forcing flag, but I insist on that
> > flag: the user should have to explicitly state that he is okay with
> > things getting broken.
> Note that the current behavior is that pkg_add -u just proceeds
> regardless of ABI compatability issues.  So one option is to leave -u
> for that, and have 'pkg_add foo.tgz' do an upgrade if foo is already
> installed and the new one is compatible.

  To quote the pkg_add(1):

       If the -u option is given, it's assumed the package should be
       replaced by the new version instead.  Before doing so, all
       packages that depend on the pkg being upgraded are checked if
       they also work with the new version.

  That check may be broken, but the intention is clearly that pkg_add -u
should not break things.

> I would like to avoid overloading -f with 'skip all checks'.  It would
> be nice to be able to skip checks individually so scripts can only force
> what they want.  For humans it doesn't matter - they run the command,
> read the error, and then run -f.

  Understood.  What do you think about -f (for human users) and a long
options to override particular checks (for scripts)?