tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Proposed fix for long-standing +CONTENTS bug



On Fri, 17 Apr 2020 at 11:17:04 -0400, Greg Troxel wrote:
> Jonathan Perkin <jperkin%joyent.com@localhost> writes:
> 
> > I've tried to reproduce this for quite a long time with stress tests
> > to no avail, but finally today something clicked along with spotting
> > this error associated with it earlier in the upgrade process:
> >
> >   pkg_add: Dependency of p5-Net-SSLeay-1.85nb1 fulfilled by perl-5.28.2, but not by perl-5.30.1
> 
> I concur that the problem and this error message are correlated.
> 
> Also "pkg_admin rebuild" resolves this, but of course the bug should be fixed.
> 
> > It turns out to be caused by dependencies of the form >=X<Y when a
> > forced upgrade (as used by pkgin, make replace, and no doubt others)
> > has taken us past Y.  The search for installed packages fails and so
> > the packages are not removed from +CONTENTS files.  This is why it
> > appears more often with perl than other packages, as that has enforced
> > versions, though it has been seen with others.
> >
> > My proposed patch is to convert any lookups of specific versions to
> > just look for -[0-9]* for this code path.  We do not support multiple
> > packages to be installed with the same PKGBASE, so there should(?) be
> > no danger here of removing the wrong package:
> >
> >   https://github.com/joyent/pkgsrc/issues/256#issuecomment-615243106
> 
> That seems ok to me.
> 
> > I'm going to be testing this patch for a while (it has passed hundreds
> > of iterations of my stress test so far) and probably ship it out to my
> > users for wider testing, but would like it to be integrated at some
> > point for everyone.
> 
> Sounds good - thanks for being the one to finally really track this
> down.

In fairness, markd@ shared a related finding back in 2018:

>I can generalize this to any set of packages that have an upper bound on
>the required package version that you then use "make replace" to go
>beyond that version of the required package, then replace the requiring
>package.   The required package will end up with both the old and new
>versions of the requiring package in its +REQUIRED_BY file.

http://mail-index.netbsd.org/tech-pkg/2018/07/18/msg020062.html

I'm hoping this is addressed too?

Regards,

Dave




Home | Main Index | Thread Index | Old Index