From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: bug#28446: linux-libre@4.1 should select 4.1.x, not 4.13.x Date: Thu, 21 Sep 2017 14:48:58 +0200 Message-ID: <87ingc2p51.fsf@elephly.net> References: <87tw06d4cr.fsf@netris.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48945) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dv0vg-0004SZ-D5 for bug-guix@gnu.org; Thu, 21 Sep 2017 08:50:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dv0va-0004Yb-IM for bug-guix@gnu.org; Thu, 21 Sep 2017 08:50:08 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:42304) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dv0va-0004YT-Er for bug-guix@gnu.org; Thu, 21 Sep 2017 08:50:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dv0vZ-0002kc-VU for bug-guix@gnu.org; Thu, 21 Sep 2017 08:50:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-reply-to: <87tw06d4cr.fsf@netris.org> 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: Mark H Weaver Cc: 28446@debbugs.gnu.org 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 “@” 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. -- Ricardo GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC https://elephly.net