diff options
author | Ludovic Courtès <ludo@gnu.org> | 2020-11-24 23:29:19 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2020-11-25 00:02:30 +0100 |
commit | 325d00e61993ddaa674f6e85e099d570866f8258 (patch) | |
tree | 2729eda67e58acf87a879ff3dda36603f83d8f10 | |
parent | 4cebe82fa680e4878543d8ccc8190e2302161c6c (diff) | |
download | guix-325d00e61993ddaa674f6e85e099d570866f8258.tar.gz |
packages: Ignore return value of origin snippets.
* guix/packages.scm (patch-and-repack): Ignore return value of SNIPPET and remove warning about non #t return value.
-rw-r--r-- | guix/packages.scm | 31 |
1 files changed, 11 insertions, 20 deletions
diff --git a/guix/packages.scm b/guix/packages.scm index bdd03a6d91..7d8d02c30e 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -728,26 +728,17 @@ specifies modules in scope when evaluating SNIPPET." (for-each apply-patch '#+patches) - (let ((result #+(if snippet - #~(let ((module (make-fresh-user-module))) - (module-use-interfaces! - module - (map resolve-interface '#+modules)) - ((@ (system base compile) compile) - '#+snippet - #:to 'value - #:opts %auto-compilation-options - #:env module)) - #~#t))) - ;; Issue a warning unless the result is #t. - (unless (eqv? result #t) - (format (current-error-port) "\ -## WARNING: the snippet returned `~s'. Return values other than #t -## are deprecated. Please migrate this package so that its snippet -## reports errors by raising an exception, and otherwise returns #t.~%" - result)) - (unless result - (error "snippet returned false"))) + #+(if snippet + #~(let ((module (make-fresh-user-module))) + (module-use-interfaces! + module + (map resolve-interface '#+modules)) + ((@ (system base compile) compile) + '#+snippet + #:to 'value + #:opts %auto-compilation-options + #:env module)) + #~#t) (chdir "..") |