summary refs log tree commit diff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2014-12-26 23:29:51 +0100
committerLudovic Courtès <ludo@gnu.org>2014-12-26 23:30:29 +0100
commit94264407815da63c5f07a519cd41838e35ab464e (patch)
tree53987ee6a08f58c9f152180652532eb722d69a8b
parentc4a1b6c2ba479c6abcd22cab6a1fcd560469e986 (diff)
downloadguix-94264407815da63c5f07a519cd41838e35ab464e.tar.gz
packages: Apply patches with "patch --force".
Fixes <http://bugs.gnu.org/19402>.
Reported by Mark H Weaver <mhw@netris.org>.

* guix/packages.scm (patch-and-repack): Change "--batch" to "--force".
-rw-r--r--guix/packages.scm5
1 files changed, 4 insertions, 1 deletions
diff --git a/guix/packages.scm b/guix/packages.scm
index 07f6d0ccbc..cf16a4730c 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -398,7 +398,10 @@ IMPORTED-MODULES specify modules to use/import for use by SNIPPET."
          (define (apply-patch input)
            (let ((patch* (assoc-ref %build-inputs input)))
              (format (current-error-port) "applying '~a'...~%" patch*)
-             (zero? (system* patch "--batch" ,@flags "--input" patch*))))
+
+             ;; Use '--force' so that patches that do not apply perfectly are
+             ;; rejected.
+             (zero? (system* patch "--force" ,@flags "--input" patch*))))
 
          (define (first-file directory)
            ;; Return the name of the first file in DIRECTORY.