tech-pkg archive

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

Re: pkg_add CHECK_OS_VERSION variable support





On Wed, 9 Dec 2020 at 08:00, Jonathan Perkin <jperkin%joyent.com@localhost> wrote:
For over 5 years my macOS binary packages have included a patch to
ignore the OS version checks in pkg_add, to prevent warnings such as:

  pkg_add: Warning: package `tsocks-1.8beta5nb3' was built for a platform:
  pkg_add: Darwin/x86_64 18.7.0 (pkg) vs. Darwin/x86_64 20.1.0 (this host)

I know that my packages are compatible across versions, and pkgin
performs more robust checks to ensure that all of the REQUIRES are in
place before installing, so the warnings were just an annoyance to my
users.

I'd like to provide something similar for my NetBSD -current packages,
and ideally avoid having to build them from a branch - it's easier if
they just build directly from pkgsrc.git.  I also think it's generally
useful for others who are happy that the packages they are trying to
install are compatible on the target host even if the kernel version
isn't identical.

So I've written a quick patch to add a variable to pkg_install.conf,
CHECK_OS_VERSION, which if set to "no" will skip the version checks
and not print the warning.  You can find the diff here:

  https://gist.github.com/jperkin/b8b98d0dd701270b4c6967280696bacd

For those not familiar with this code, this is only for the kernel
version comparison (i.e. uname -r), there are still always fatal
warnings if either the OPSYS or MACHINE_ARCH do not match.

I'm planning to commit this and then enable it for my NetBSD packages,
thus avoiding having to switch to a new 9.99.x repository every time
the version bumps.

Comments welcome,


Thanks - I think it's a great idea

Best,
Alistair


Home | Main Index | Thread Index | Old Index