tech-pkg archive

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

Re: OS_VERSION on Linux



On Thu, Oct 15, 2020 at 01:59:57PM -0700, Michael Forney wrote:
> On 2020-10-09, Jonathan Perkin <jperkin%joyent.com@localhost> wrote:
> > * On 2020-10-09 at 20:02 BST, nia wrote:
> >
> >> I have Opinions about this check in pkg_add.
> >>
> >> It's often wrong even on NetBSD (e.g. it will warn you about
> >> installing 9.0 packakges on 9.1, even though that's currently
> >> the recommended procedure)...
> >>
> >> AFAIK, joyent has it locally patched out?
> >
> > Yeh, I remove it for our macOS package sets.  I'd recommend doing the
> > same for anyone who is distributing packages for OS which do not break
> > ABI compatibility.
> >
> > It definitely doesn't make any sense on Linux.
> 
> Agreed. So maybe what is needed is just smarter platform-specific
> tests in add/perform.c:compatible_platform(). For Linux, it could just
> always return 1, and for other platforms, it could check whatever is
> appropriate for that platform.
> 
> Currently, the versions are considered compatible if the package
> version is a substring of the host version, and on NetBSD, trailing
> suffixes _ALPHA, _BETA, _RC, _STABLE, and _PATCH are ignored. It
> sounds to me like NetBSD might need some extra logic to allow
> increasing minor versions (or perhaps to only compare the major
> version).

On NetBSD it should only check the major, at the very least.

I'm still not sure if it makes sense because you can run old
userlands on newer kernels, use packages from older versions if
you have the right shared libraries, etc.


Home | Main Index | Thread Index | Old Index