From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH] gnu-maintenance: update-package-source: Only update the desired package. Date: Tue, 05 Apr 2016 11:47:21 +0200 Message-ID: <87shz0v13q.fsf@gnu.org> References: <1459830946-2583-1-git-send-email-iyzsong@gmail.com> <87h9fgfomg.fsf@igalia.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]:53663) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1anNa4-0002rS-Au for guix-devel@gnu.org; Tue, 05 Apr 2016 05:47:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1anNa1-0000Wp-2j for guix-devel@gnu.org; Tue, 05 Apr 2016 05:47:28 -0400 In-Reply-To: <87h9fgfomg.fsf@igalia.com> (Andy Wingo's message of "Tue, 05 Apr 2016 10:25:59 +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-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Andy Wingo Cc: guix-devel@gnu.org, =?utf-8?B?5a6L5paH5q2m?= Andy Wingo skribis: > 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 = writes: > >> 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 s= tring >> 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' ? I mentioned it mostly as a possible source of inspiration, but I think it cannot be used as-is here. The trick to determine the boundaries of the =E2=80=98package=E2=80=99 form= looks reasonable to me. Thanks, Ludo=E2=80=99.