From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH 1/2] profiles: manifest-lookup-package: Optionally match version prefix. Date: Mon, 26 Sep 2016 12:41:02 +0200 Message-ID: <87intjj64h.fsf@gnu.org> References: <20160922202827.22039-1-rekado@elephly.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51060) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1boYBB-0003n2-QH for guix-devel@gnu.org; Mon, 26 Sep 2016 11:50:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1boYB9-0005Aw-SA for guix-devel@gnu.org; Mon, 26 Sep 2016 11:50:52 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:57208) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1boYB9-0005AS-Lh for guix-devel@gnu.org; Mon, 26 Sep 2016 11:50:51 -0400 In-Reply-To: <20160922202827.22039-1-rekado@elephly.net> (Ricardo Wurmus's message of "Thu, 22 Sep 2016 22:28:26 +0200") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Ricardo Wurmus Cc: guix-devel@gnu.org Ricardo Wurmus skribis: > * guix/profiles.scm (manifest-lookup-package): Optionally filter store > item matches by version prefix. [...] > -(define (manifest-lookup-package manifest name) > +(define* (manifest-lookup-package manifest name #:optional version) > "Return as a monadic value the first package or store path referenced = by > -MANIFEST that named NAME, or #f if not found." > +MANIFEST that is named NAME and optionally has the given VERSION prefix,= or #f > +if not found." This should be phrased to mention that VERSION can be #f. > + (let-values (((pkg-name pkg-version) Rather =E2=80=98name*=E2=80=99 and =E2=80=98version*=E2=80=99, but no abbre= viations. > + (package-name->name+version > + (store-path-package-name item)))) > + (and (equal? name pkg-name) =E2=80=98string=3D?=E2=80=99 OK with these changes, thanks! Ludo=E2=80=99.