GNU bug report logs - #49493
[PATCH]: gnu: emacs-telega: Fix 'patch-source' phase.

Previous Next

Package: guix-patches;

Reported by: Zhu Zihao <all_but_last <at> 163.com>

Date: Fri, 9 Jul 2021 15:20:02 UTC

Severity: normal

Tags: patch

Done: Leo Prikler <leo.prikler <at> student.tugraz.at>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 49493 in the body.
You can then email your comments to 49493 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#49493; Package guix-patches. (Fri, 09 Jul 2021 15:20:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Zhu Zihao <all_but_last <at> 163.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Fri, 09 Jul 2021 15:20:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Zhu Zihao <all_but_last <at> 163.com>
To: guix-patches <at> gnu.org
Cc: Leo Prikler <leo.prikler <at> student.tugraz.at>
Subject: [PATCH]: gnu: emacs-telega: Fix 'patch-source' phase.
Date: Fri, 09 Jul 2021 23:04:09 +0800
[Message part 1 (text/plain, inline)]
'patch-source' phase will replace binary name with wrong full path name
(e.g. ffmpeg => /gnu/store/<hash>-ffmpeg-X.Ybin/ffmpeg)

This patch attempts to fix this issue, and also add missing
'telega-vvnote.el' to patch targets.

[signature.asc (application/pgp-signature, inline)]
[0001-gnu-emacs-telega-Fix-patch-source-phase.patch (text/x-patch, inline)]
From f63d44007a89f13ff9e23bbf0b8fb22ee4d94dcb Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last <at> 163.com>
Date: Fri, 9 Jul 2021 22:58:34 +0800
Subject: [PATCH] gnu: emacs-telega: Fix 'patch-source' phase.

* gnu/packages/emacs-xyz.scm(emacs-telega):

[arguments]<phases>: Add missing slash in file name.

Patch telega-vvnote.el.
---
 gnu/packages/emacs-xyz.scm | 30 +++++++++++++++++++-----------
 1 file changed, 19 insertions(+), 11 deletions(-)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 6ac61fd596..0770795044 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -26290,17 +26290,25 @@ service, and connect it with Emacs via inter-process communication.")
              (let* ((ffmpeg (assoc-ref inputs "ffmpeg"))
                     (ffmpeg-bin (string-append ffmpeg "/bin/ffmpeg"))
                     (ffplay-bin (string-append ffmpeg "/bin/ffplay")))
-              (substitute* "telega-ffplay.el"
-                (("(shell-command-to-string\|concat) \"(ffmpeg\|ffprobe)"
-                  all func cmd)
-                 (string-append func " \"" (assoc-ref inputs "ffmpeg")
-                                "bin/" cmd))
-                (("\\(executable-find \"ffplay\"\\)")
-                 (string-append "(and (file-executable-p \"" ffplay-bin "\")"
-                                "\"" ffplay-bin "\")"))
-                (("\\(executable-find \"ffmpeg\"\\)")
-                 (string-append "(and (file-executable-p \"" ffmpeg-bin "\")"
-                                "\"" ffmpeg-bin "\")"))))))
+
+               (define targets
+                 '("telega-ffplay.el" "telega-vvnote.el"))
+
+               (define (patch-ffmpeg file)
+                 (substitute* file
+                   (("(shell-command-to-string\|concat) \"(ffmpeg\|ffprobe)"
+                     all func cmd)
+                    (string-append func " \"" (assoc-ref inputs "ffmpeg")
+                                   "/bin/" cmd))
+                   (("\\(executable-find \"ffplay\"\\)")
+                    (string-append "(and (file-executable-p \"" ffplay-bin "\")"
+                                   "\"" ffplay-bin "\")"))
+                   (("\\(executable-find \"ffmpeg\"\\)")
+                    (string-append "(and (file-executable-p \"" ffmpeg-bin "\")"
+                                   "\"" ffmpeg-bin "\")"))))
+
+               (for-each patch-ffmpeg targets)
+               #t)))
          (add-after 'unpack 'configure
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (substitute* "telega-server.el"
-- 
2.32.0

[Message part 4 (text/plain, inline)]
-- 
Retrieve my PGP public key:

  gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F

Zihao

Reply sent to Leo Prikler <leo.prikler <at> student.tugraz.at>:
You have taken responsibility. (Fri, 09 Jul 2021 16:00:02 GMT) Full text and rfc822 format available.

Notification sent to Zhu Zihao <all_but_last <at> 163.com>:
bug acknowledged by developer. (Fri, 09 Jul 2021 16:00:02 GMT) Full text and rfc822 format available.

Message #10 received at 49493-done <at> debbugs.gnu.org (full text, mbox):

From: Leo Prikler <leo.prikler <at> student.tugraz.at>
To: Zhu Zihao <all_but_last <at> 163.com>, 49493-done <at> debbugs.gnu.org
Subject: Re: [PATCH]: gnu: emacs-telega: Fix 'patch-source' phase.
Date: Fri, 09 Jul 2021 17:59:00 +0200
Am Freitag, den 09.07.2021, 23:04 +0800 schrieb Zhu Zihao:
> 'patch-source' phase will replace binary name with wrong full path
> name
> (e.g. ffmpeg => /gnu/store/<hash>-ffmpeg-X.Ybin/ffmpeg)
> 
> This patch attempts to fix this issue, and also add missing
> 'telega-vvnote.el' to patch targets.
Thanks for catching this.  I've simplified your patch and pushed it.

Regards,
Leo





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 07 Aug 2021 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 260 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.