Subject: [PATCH core-updates-frozen 1/8] guix: packages: Fix repacking of plain tarballs.

From: Maxim Cournoyer <[email-masked]>
Date: Fri, 3 Sep 2021 11:31:09 -0400

Fixes <https://issues.guix.gnu.org/50066>.

* guix/packages.scm (patch-and-repack): Test for a tarball using tarball? and
move the plain file copy to the else clause.

Reported-by: Mathieu Othacehe <[email-masked]>
---
 guix/packages.scm | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/guix/packages.scm b/guix/packages.scm
index 2349bb4340..f0dd1d43d2 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -836,10 +836,10 @@ specifies modules in scope when evaluating SNIPPET."
                ((file-is-directory? #+source)
                 (copy-recursively directory #$output
                                   #:log (%make-void-port "w")))
-               ((not #+comp)
-                (copy-file file #$output))
-               (else
-                (repack directory #$output)))))))
+               ((or #+comp (tarball? #+source))
+                (repack directory #$output))
+               (else                    ;single uncompressed file
+                (copy-file file #$output)))))))
 
     (let ((name (if (or (checkout? original-file-name)
                         (not (compressor original-file-name)))
-- 
2.33.0