GNU bug report logs -
#28446
linux-libre@4.1 should select 4.1.x, not 4.13.x
Previous Next
Reported by: Mark H Weaver <mhw <at> netris.org>
Date: Wed, 13 Sep 2017 15:08:01 UTC
Severity: normal
Done: ludo <at> gnu.org (Ludovic Courtès)
Bug is archived. No further changes may be made.
Full log
Message #14 received at 28446 <at> debbugs.gnu.org (full text, mbox):
Chris Marusich <cmmarusich <at> gmail.com> writes:
> Ricardo Wurmus <rekado <at> elephly.net> writes:
>
>> Hi Mark,
>>
>>> Currently, the package specification "linux-libre <at> 4.1" selects version
>>> 4.13. It should instead select version 4.1.
>>
>> We consider everthing following the “@” a version string prefix. Since
>> versions are arbitrary strings “4.1” is considered a valid prefix of
>> “4.13”. If a user supplied the version string “4.1.” they would get the
>> appropriate package.
>>
>> The current implementation sorts all matches in decreasing version order
>> and picks the package with the highest version. This is implemented in
>> (gnu packages) with “%find-packages”, “find-best-packages-by-name”, and
>> “find-packages-by-name”.
>>
>> Should we try to make the code understand version strings better and
>> compare substrings of the version string? We could fall back to using
>> “string-prefix?” when the substring is not a number.
>>
>
> Why not require an exact match? If someone asks for 4.1, they shouldn't
> get 4.11 or 4.13 or anything else; they should get 4.1.
“4.1” has no exact match. The full version string is “4.1.43”. If we
want users to get “4.1.43” when they input “4.1”, then we’ll have to
make the code understand version strings better.
Not all version strings are dot-separated numbers. Maybe this doesn’t
matter and we’ll just ignore those cases.
> In my
> experience, mechanisms that attempt to guess which package version the
> user meant generally wind up choosing the wrong thing at some point. I
> think it would be reasonable to bail out and ask the user to clarify
> what they wanted.
The code already produces a warning in this case but proceeds to pick
the match with the highest version.
--
Ricardo
GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC
https://elephly.net
This bug report was last modified 7 years and 68 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.