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 Thu, 10 Dec 2020 at 00:50:46 +0100, Thomas Klausner wrote:
> This topic comes up every couple of years, but nothing happens.
> 
> The code is simple. You can find it in
> pkgsrc/pkgtools/pkg_install/files/add/perform.c.
> 
> The function static int compatible_platform(const char *opsys, const
> char *host, const char *package) compares the operating system version
> from "host" with the one registered in the "package". The "opsys"
> argument is provided so that you can have different checks depending
> on the operating system.
> 
> The code compares the strings provided. If they are the same -
> fine. If not, it calls static int end_of_version(const char *opsys,
> const char *version_end) on both remainders of the strings. "opsys",
> again, is provided so that the code can be operating system dependent;
> "version_end" is the part of the the version that mismatches. On
> NetBSD, this is currently compared to the following list and ignored
> if it's one of these:
> 
> _ALPHA
> _BETA
> _RC
> _STABLE
> _PATCH
> 
> since these are common strings that are attached to alpha or beta
> versions or stable branches or patch releases of NetBSD.

Then there's also the pkgtools/osabi package, which, for NetBSD,
doesn't even take that "end of version" into consideration, and so is a
very blunt tool that causes confusion. (Unless its separate CHECK_OSABI
variable is set to "no", which if left set indefinitely may undermine
the whole point of that package.)

Dave




Home | Main Index | Thread Index | Old Index