Re: [Pkgutil-users] patch to support non-standard VERSION entries
Status: Beta
Brought to you by:
bonivart
|
From: <ma...@pr...> - 2010-07-27 10:48:21
|
On Mon 26/07/10 4:11 PM , Peter Bonivart bon...@op... sent: > On Mon, Jul 26, 2010 at 4:56 PM, ma...@pr... wrote: >> 1.0 vs. 1.0b2 would actually still work given the patch I presented you, >> because the b would be stripped leaving 1.0 vs. 1.02. What wouldn't have >> worked was 1.0 vs. 1.0b. > > Just a quick reply to this part, another will follow when I have more > time. > I chose that example intentionally since an official 1.0 should never > be replaced with a beta for the same version, that's a downgrade. I > meant 1.0 beta 2 with my 1.0b2. Maybe you read it as something else, > kind of proves my point... ;-) I think I understand your concern. But why would you put a beta package in a production repo? Surely you'd put it in a dev repo. In which case, yes of course if you request an upgrade of a package with pkgutil you expect to download the very latest, and if that's a beta, so be it. If you didn't really want the beta and wanted a different version, you can request that. But the intention is quite explicit in your pkgutil man page, that with -i when no specific version is requested, "the latest version found is chosen". The latest beta *is* the latest version. > I just see it as an endless stream of patches to plug new variations > that crop up but as long as it's isolated from the CSW way of doing > the compare I'm still not opposed to it and I will test your patch as > soon as possible. I've tightened my patch up even more, so that VERSION comparison will never occur on a CSW package (only the existing REV comparison). In order to get VERSION compare to work now, noncsw must be set to true, pkgcmpstyle must be set to 1, and the package name must not begin with the letters CSW. This is a surefire way that this code will never affect CSW. In order to do this, I've had to pass the package name as an extra arg to the verscmp subroutine. The attached patch needs to be applied after the big patch I sent you. Thanks, Mark. |