packages: Silence tar's support for --sort check output.

* guix/packages.scm (patch-and-repack)
<tar-supports-sort?>: Invoke with 'invoke/quiet', catching any message
condition.

Change-Id: I1feee605f77bfe633d22901a3250e4c530fee6a6
This commit is contained in:
Maxim Cournoyer 2024-01-21 12:07:40 -05:00 committed by Ludovic Courtès
parent 3c8ca6b26b
commit 92f66ab60d
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -1009,14 +1009,18 @@ (define build
(ice-9 regex) (ice-9 regex)
(srfi srfi-1) (srfi srfi-1)
(srfi srfi-26) (srfi srfi-26)
(srfi srfi-34)
(srfi srfi-35)
(guix build utils)) (guix build utils))
;; The --sort option was added to GNU tar in version 1.28, released ;; The --sort option was added to GNU tar in version 1.28, released
;; 2014-07-28. During bootstrap we must cope with older versions. ;; 2014-07-28. During bootstrap we must cope with older versions.
(define tar-supports-sort? (define tar-supports-sort?
(zero? (system* (string-append #+tar "/bin/tar") (guard (c ((message-condition? c) #f))
(invoke/quiet (string-append #+tar "/bin/tar")
"cf" "/dev/null" "--files-from=/dev/null" "cf" "/dev/null" "--files-from=/dev/null"
"--sort=name"))) "--sort=name")
#t))
(define (apply-patch patch) (define (apply-patch patch)
(format (current-error-port) "applying '~a'...~%" patch) (format (current-error-port) "applying '~a'...~%" patch)