On 07/21/2016 01:12 AM, Michał Górny wrote: > On Thu, 21 Jul 2016 00:22:36 +0300 > Andrew Savchenko <birc...@gentoo.org> wrote: > >> On Wed, 20 Jul 2016 15:12:01 -0400 Michael Orlitzky wrote: >>> On 07/20/2016 01:13 PM, NP-Hardass wrote: >>>> Display-If-Installed: <=net-fs/openafs-kernel-1.6.18.2 >>>> >>>> ... >>>> >>>> Starting with net-fs/openafs-kernel-1.6.18.2, this condition is no longer >>>> forced in the ebuild. >>> >>> Might not that version bound might backfire if someone upgrades before >>> reading the news? People who pull from git often don't necessarily get >>> the news in a timely fashion. >>> >>> Would it be simpler to ewarn in the ebuilds (for e.g. a year) if >>> DEBUG_RODATA=n? >> >> We already do this in openafs-kernel-1.6.18.2.ebuild: >> >> if use kernel_linux && [[ ${REPLACING_VERSIONS} < "1.6.18.2" ]]; then > > Few important QA notes: > > 1. < is lexicographical comparison, so e.g. 1.6.2.2 < 1.6.18.2 gives > false, > > 2. REPLACING_VERSIONS can have more than one value, > > 3. Finally, '' < 1.6.18.2 gives true, so it is also printed for initial > install. >
If you want to do a package version comparison, you probably want to use the function version_is_at_least() in versionator.eclass. The primary version comparison function in that eclass was written to be a complete implementation of the version comparison algorithm in PMS. Maybe eventually we'll get a version comparison function in PMS so we won't have to resort to the wonderfully complex bash functions in that eclass :). -- Jonathan Callen
signature.asc
Description: OpenPGP digital signature