guix: packages: Fix repacking of plain tarballs.

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 <othacehe@gnu.org>
This commit is contained in:
Maxim Cournoyer 2021-08-30 17:32:21 -04:00
parent 8a613f9d4e
commit ac4417328d
No known key found for this signature in database
GPG Key ID: 1260E46482E63562
1 changed files with 4 additions and 4 deletions

View File

@ -981,10 +981,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)))