pkgsrc-Users archive

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

Re: Strange CONFLICTS definitions render pkgin full-upgrade impossible

* On 2021-05-21 at 12:31 BST, Aleksej Lebedev wrote:

Your point is clear. Just one last though. It is a bug. I wanted to fix it but I couldn't understand the root cause until I looked at the source code of pkgin - only then I realized the problem is in the package itself.
A better message from pkgin would save a few hours of my time.

So there are two better places to do work here if we want to avoid this problem in the future:

 - For each proposed CONFLICTS entries, perform a pmatch against the
   target PKGNAME during pkg_create, and abort if there is a match.
   This will ensure we never create and distribute a broken package.

 - Add a similar check to pkglint based on Makefile contents.  This will
   ensure we never commit a broken package, assuming the committer runs
   pkglint before committing...

The pkg_create patch should be trivial. The pkglint patch may be more complex and may not catch all cases, as it would need to compute all possible PKGNAME variations.

Jonathan Perkin  -  Joyent, Inc.  -

Home | Main Index | Thread Index | Old Index