From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Marusich Subject: bug#28446: linux-libre@4.1 should select 4.1.x, not 4.13.x Date: Thu, 21 Sep 2017 18:53:58 -0700 Message-ID: <87a81njy6h.fsf@gmail.com> References: <87tw06d4cr.fsf@netris.org> <87ingc2p51.fsf@elephly.net> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43157) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dvDBK-0000zW-KQ for bug-guix@gnu.org; Thu, 21 Sep 2017 21:55:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dvDBG-0000SI-Nt for bug-guix@gnu.org; Thu, 21 Sep 2017 21:55:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:43365) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dvDBG-0000Ro-Jn for bug-guix@gnu.org; Thu, 21 Sep 2017 21:55:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dvDBG-0004ZU-6t for bug-guix@gnu.org; Thu, 21 Sep 2017 21:55:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87ingc2p51.fsf@elephly.net> (Ricardo Wurmus's message of "Thu, 21 Sep 2017 14:48:58 +0200") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Ricardo Wurmus Cc: 28446@debbugs.gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ricardo Wurmus writes: > Hi Mark, > >> Currently, the package specification "linux-libre@4.1" selects version >> 4.13. It should instead select version 4.1. > > We consider everthing following the =E2=80=9C@=E2=80=9D a version string = prefix. Since > versions are arbitrary strings =E2=80=9C4.1=E2=80=9D is considered a vali= d prefix of > =E2=80=9C4.13=E2=80=9D. If a user supplied the version string =E2=80=9C4= .1.=E2=80=9D 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 =E2=80=9C%find-packages=E2=80=9D, =E2=80=9Cfind-best-= packages-by-name=E2=80=9D, and > =E2=80=9Cfind-packages-by-name=E2=80=9D. > > Should we try to make the code understand version strings better and > compare substrings of the version string? We could fall back to using > =E2=80=9Cstring-prefix?=E2=80=9D 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. 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. =2D-=20 Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAlnEbTcACgkQ3UCaFdgi Rp1f7A/8CNoEGmJO7/+dyTdPqJTCoSJvuQp8RPwHXDcooMXvnoXToZS8oD6AAsmc Z1uUGzB6kGd6aHgD2ANNGMWq31N2ekrB/tqxyHmsB+uNm2Wk5SNWK3TsxqRE8VQd 2AsohUWfCWvpMo7iJLcVQOSF2I7vlWSjB1Xu4qbXRwxUMR85aD9DkAQRDW1hbu/e 5zbOCwzeub5lh2gCKdB9ae9OmfqCkCQga4EKZTECCTiRC0qiFTLGdDVUhKu/f68/ 6MCSma/HMIhl68RTUJqtEpthcpxy3XJ6sdCFNEoNJeQO4rWGRZQDF4TiVgphGNc1 GdIeJm7lkk4VgTmUnv5J535DsgVYHvYuSaR05k5UXbw9GMba0FeFzHMsYSGl9Uxr JIQvvISnK9121GOteQzH1z4dp8JembefrQ9s5rIpXWIMwVCLud5j0ORmnRtLPN6F pN5NkV9bVrPXFw0tES3AEyqLDZ+iK1418cNBWjj/+Bs5VPaX9jW8L8W+uqGgNfRk oj2NGIeqjmLFPHPCW1/qjYY7R4wtXGBjBa4VuMvHZ0DYPKbQiW/cOwKYeGEjK/wj POOmn9I5Quj+fZNRz9uZ1Y8XCj+iNvClixb8IFwtAQfBzubsA1kjBU8xvv6crUtk bq5EdkjgUtwY51S0/sc2M3n17sgd4MIkmWvvjDCzweRyvJxyoZ8= =LLhx -----END PGP SIGNATURE----- --=-=-=--