Date: Tue, 28 May 2002 08:49:33 -0700 From: bmah@FreeBSD.ORG (Bruce A. Mah) To: "Akinori MUSHA" <knu@iDaemons.org> Cc: Maxim Sobolev <sobomax@FreeBSD.ORG>, ports@FreeBSD.ORG, bmah@FreeBSD.ORG Subject: Re: Bug in version comparison routine of pkg_version Message-ID: <200205281549.g4SFnXtd089112@intruder.bmah.org> In-Reply-To: <86lma4fxy8.wl@archon.local.idaemons.org> References: <3CF34321.C27E936F@FreeBSD.org> <86lma4fxy8.wl@archon.local.idaemons.org>
next in thread | previous in thread | raw e-mail | index | archive | help
If memory serves me right, "Akinori MUSHA" wrote: > At Tue, 28 May 2002 11:43:13 +0300, > sobomax wrote: > > For some reason pkg_version(1) thinks that version 1.7_5 is > > greater than version 1.7.0.1, but correctly reports that 1.7 > > is less than 1.7.0.1. This doesn't look like a good thing to > > me and we probably should fix it before 4.6 is out. I don't > > know if portupgrade is affected, but I suspect that it could > > because AFAIK knu helped with implementing pkg_version's > > version comparison routine. > > The comparison routine that the portupgrade suite uses handles it > correctly: > > knu@archon[2]% pkg_version -t 1.7_5 1.7.0.1 > > > knu@archon[2]% portversion -t 1.7_5 1.7.0.1 > < > > I remember Bruce modified my implementation slightly when making > pkg_version aware of PORTREVISION and PORTEPOCH. That isn't my recollection, but you know what they say about the memory being the first thing to go... :-) I discovered another, possibly-related bug as well: nimitz:bmah% pkg_version -t 1.7 1.7.0.1 = portversion does the right thing in this case also. It's also of note that reg's C reimplementation of pkg_version handles both of these cases correctly. It hasn't been committed to -CURRENT yet, but I encourage any of you who use pkg_version to test it and make sure it works...see the archives of ports@ or audit@ for a pointer to a patch. I'll start looking into this problem...thanks for pointing it out! Bruce. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200205281549.g4SFnXtd089112>