From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Kost Subject: Re: Timestamps in ...-autoloads.el files Date: Thu, 19 May 2016 19:29:46 +0300 Message-ID: <87vb2ayps5.fsf@gmail.com> References: <87zize1mmq.fsf@gnu.org> <87si55h205.fsf@gmail.com> <87mvvde3h0.fsf@gnu.org> <87vba0mkwy.fsf@gmail.com> <87y4ew88km.fsf@gnu.org> <8737pomysb.fsf@gmail.com> <8737piyxvv.fsf@gnu.org> <87oa85pvy4.fsf@gmail.com> <874m9xujxm.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58260) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b3Qpc-0004OB-6P for guix-devel@gnu.org; Thu, 19 May 2016 12:29:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b3QpZ-0002wm-0c for guix-devel@gnu.org; Thu, 19 May 2016 12:29:52 -0400 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: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s (2016-05-17 12:12 +0300) wrote: > Alex Kost skribis: > >> Ludovic Court=C3=A8s (2016-05-16 15:45 +0300) wrote: [...] >>> $ git describe >>> v0.10.0-798-g8a7680a >>> $ tar tvf $(./pre-inst-env guix build -S emacs) |grep 'autoload\.el' >>> -rw-r--r-- root/root 37292 1970-01-01 01:00 emacs-24.5/lisp/emacs-l= isp/autoload.el >>> -rw-r--r-- root/root 37127 1970-01-01 01:00 emacs-24.5/lisp/emacs-l= isp/autoload.el.orig >>> -rw-r--r-- root/root 22624 1970-01-01 01:00 emacs-24.5/lisp/emacs-l= isp/autoload.elc >>> >>> Upstream=E2=80=99s tarball already includes those three files. >> >> IIUC this source is after applying our patches (including >> "emacs-source-date-epoch.patch"): >> >> - =E2=80=9Cautoload.el.orig=E2=80=9D is the original file from the upstr= eam; > > Indeed, this one isn=E2=80=99t present in upstream=E2=80=99s tarball: > > $ wget -q -O - ftp://ftp.gnu.org/gnu/emacs/emacs-24.5.tar.xz | tar tJvf -= | grep 'autoload\.' > -rw-rw-r-- nico/nico 37127 2015-04-02 09:23 emacs-24.5/lisp/emacs-lis= p/autoload.el > -rw-r--r-- nico/nico 22624 2015-04-08 19:16 emacs-24.5/lisp/emacs-lis= p/autoload.elc > > How come we=E2=80=99re introducing this one? I thought =E2=80=98patch=E2= =80=99 did not produce > .orig files unless the patch failed to apply, but here the patch > correctly applies, only with a small offset (can be seen by running > =E2=80=98guix build -S emacs --check=E2=80=99): > > patching file lisp/loadup.el > patching file lisp/emacs-lisp/autoload.el > Hunk #1 succeeded at 361 (offset -17 lines). Indeed, I also didn't know that "patch" produces such .orig files when a patch applies with offset. > Apparently we have to use =E2=80=98--no-backup-if-mismatch=E2=80=99 to av= oid that. You even found the flag, thanks! So is it OK to apply the attached patch to core-updates? --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: attachment; filename=0001-packages-Use-no-backup-if-mismatch-for-patching.patch Content-Transfer-Encoding: quoted-printable >From bcd636eff01f39583e8742b123d51550f9500795 Mon Sep 17 00:00:00 2001 From: Alex Kost Date: Thu, 19 May 2016 19:11:58 +0300 Subject: [PATCH] packages: Use '--no-backup-if-mismatch' for patching. MIME-Version: 1.0 Content-Type: text/plain; charset=3DUTF-8 Content-Transfer-Encoding: 8bit Suggested-by: Ludovic Court=C3=A8s * guix/packages.scm (patch-and-repack)[build]: Use '--no-backup-if-mismatch' patch flag to avoid making *.orig files. --- guix/packages.scm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/guix/packages.scm b/guix/packages.scm index d62d1f3..a7b502c 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -464,9 +464,11 @@ IMPORTED-MODULES specify modules to use/import for use= by SNIPPET." (format (current-error-port) "applying '~a'...~%" patch) =20 ;; Use '--force' so that patches that do not apply perfectly a= re - ;; rejected. + ;; rejected. Use '--no-backup-if-mismatch' to prevent making + ;; "*.orig" file if a patch is applied with offset. (zero? (system* (string-append #+patch "/bin/patch") - "--force" #+@flags "--input" patch))) + "--force" "--no-backup-if-mismatch" + #+@flags "--input" patch))) =20 (define (first-file directory) ;; Return the name of the first file in DIRECTORY. --=20 2.7.3 --=-=-=--