From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Wingo Subject: Re: [PATCH] gnu-maintenance: update-package-source: Only update the desired package. Date: Tue, 05 Apr 2016 10:25:59 +0200 Message-ID: <87h9fgfomg.fsf@igalia.com> References: <1459830946-2583-1-git-send-email-iyzsong@gmail.com> 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]:35418) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1anMJu-00053m-Hq for guix-devel@gnu.org; Tue, 05 Apr 2016 04:26:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1anMJr-0005uI-Ri for guix-devel@gnu.org; Tue, 05 Apr 2016 04:26:42 -0400 Received: from pb-sasl0.pobox.com ([208.72.237.25]:62830 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1anMJr-0005g8-LI for guix-devel@gnu.org; Tue, 05 Apr 2016 04:26:39 -0400 In-Reply-To: <1459830946-2583-1-git-send-email-iyzsong@gmail.com> (=?utf-8?B?IuWui+aWh+atpiIncw==?= message of "Tue, 5 Apr 2016 12:35:46 +0800") 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-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: =?utf-8?B?5a6L5paH5q2m?= Cc: guix-devel@gnu.org Hi =E5=AE=8B=E6=96=87=E6=AD=A6 :) On Tue 05 Apr 2016 06:35, =E5=AE=8B=E6=96=87=E6=AD=A6 w= rites: > diff --git a/guix/upstream.scm b/guix/upstream.scm > index cea23fe..f4bc09c 100644 > --- a/guix/upstream.scm > +++ b/guix/upstream.scm > @@ -205,6 +209,37 @@ and 'interactive' (default)." > "Modify the source file that defines PACKAGE to refer to VERSION, > whose tarball has SHA256 HASH (a bytevector). Return the new version st= ring > if an update was made, and #f otherwise." > + (define (substitute+ file start end pattern+procs) Sorry to tell you mixed signals, but did you consider Ludovic's suggestion to use `package-field-location' ? If it turns out that this more textual approach is best, consider factoring the helper out to a top-level function. Someone else is going to want to use it later :) Andy